Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dependency Tracking with Deptrac

Dependency Tracking with Deptrac

Jan Schädlich

October 13, 2020
Tweet

More Decks by Jan Schädlich

Other Decks in Programming

Transcript

  1. Dependency Tracking with Deptrac Jan Schädlich @jschaedl SensioLabs 2020-10-13 |

    Symfony User Group Hamburg An Introduction with Examples
  2. Core Admin Customer Driven Driving Hexagonal Architecture Onion Architecture Separation

    of Concerns ‣ Separation is achieved by dividing the software into layers ‣ At least one layer for business rules and another for interfaces
  3. ✓ PHAR | https://github.com/sensiolabs-de/deptrac/releases ✓ phive install -g sensiolabs-de/deptrac ✓

    composer require --dev sensiolabs-de/deptrac-shim X composer require --dev sensiolabs-de/deptrac
  4. # ... layers: - name: Entity collectors: - type: className

    regex: .*\\App\\Entity\\.* ‣ There are also other collector types available.
  5. # ... layers: # ... - name: UseCase collectors: -

    type: className regex: .*\\App\\UseCase\\.*
  6. # ... layers: # ... - name: Controller collectors: -

    type: className regex: .*\\App\\Controller\\.*
  7. # ... ruleset: Entity: ~ UseCase: - Entity Controller: -

    Entity - UseCase The Entity layer must not depend on other layers. The UseCase layer only depends on the Entity layer. The Controller layer can depend on the Entity and the UseCase layer.
  8. # bool - name: Admin collectors: - type: bool must:

    - type: className regex: .*\\Admin\\.* must_not: - type: className regex: .*\\AdminBundle\\.*