From caf496985b63a014368965bd9b56aa31a7ee9b4e Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 09:41:35 +0000 Subject: [PATCH 1/2] Install the latest version of deptrac with composer global install phar seems to be abandoned. --- resources/architecture.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/resources/architecture.json b/resources/architecture.json index 8ac9315..a54288e 100644 --- a/resources/architecture.json +++ b/resources/architecture.json @@ -17,12 +17,10 @@ { "name": "deptrac", "summary": "Enforces dependency rules between software layers", - "website": "https://github.com/qossmic/deptrac", + "website": "https://github.com/deptrac/deptrac", "command": { - "phive-install": { - "alias": "deptrac", - "bin": "%target-dir%/deptrac", - "sig": "D4F06E96D1BD037B" + "composer-global-install": { + "package": "deptrac/deptrac" } }, "test": "deptrac list", From 51db7bce99040c3af892c28ad6c28b0df6e681d6 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 24 Feb 2025 09:44:06 +0000 Subject: [PATCH 2/2] Install deptract with composer instead of the phar --- Makefile | 3 +-- composer.json | 3 ++- deptrac.yaml | 44 ++++++++++++++++++++++---------------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index bbcd8ff..fff6583 100644 --- a/Makefile +++ b/Makefile @@ -133,8 +133,7 @@ tools/php-cs-fixer: curl -Ls https://cs.symfony.com/download/php-cs-fixer-v3.phar -o tools/php-cs-fixer && chmod +x tools/php-cs-fixer tools/deptrac: - curl -Ls https://github.com/qossmic/deptrac/releases/download/1.0.2/deptrac.phar -o tools/deptrac && chmod +x tools/deptrac - curl -Ls https://github.com/qossmic/deptrac/releases/download/1.0.2/deptrac.phar.asc -o tools/deptrac.asc + ln -sf ../vendor/bin/deptrac tools/deptrac tools/box: curl -Ls https://github.com/humbug/box/releases/download/4.2.0/box.phar -o tools/box && chmod +x tools/box diff --git a/composer.json b/composer.json index bcdfb10..98a45a1 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,8 @@ "require-dev": { "phpunit/phpunit": "^10.4", "zalas/phpunit-globals": "^3.2", - "infection/infection": "^0.29" + "infection/infection": "^0.29", + "deptrac/deptrac": "^3.0" }, "autoload": { "psr-4": { diff --git a/deptrac.yaml b/deptrac.yaml index 99dfe48..d7543f8 100644 --- a/deptrac.yaml +++ b/deptrac.yaml @@ -5,47 +5,47 @@ parameters: layers: - name: Cli collectors: - - type: className - regex: ^Zalas\\Toolbox\\Cli\\.* + - type: classLike + value: ^Zalas\\Toolbox\\Cli\\.* - name: Json collectors: - - type: className - regex: ^Zalas\\Toolbox\\Json\\.* + - type: classLike + value: ^Zalas\\Toolbox\\Json\\.* - name: Runner collectors: - - type: className - regex: ^Zalas\\Toolbox\\Runner\\.* + - type: classLike + value: ^Zalas\\Toolbox\\Runner\\.* - name: Tool collectors: - - type: className - regex: ^Zalas\\Toolbox\\Tool\\.* + - type: classLike + value: ^Zalas\\Toolbox\\Tool\\.* - name: UseCase collectors: - - type: className - regex: ^Zalas\\Toolbox\\UseCase\\.* + - type: classLike + value: ^Zalas\\Toolbox\\UseCase\\.* - name: Psr Container collectors: - - type: className - regex: ^Psr\\Container\\.* + - type: classLike + value: ^Psr\\Container\\.* - name: Symfony Console collectors: - - type: className - regex: ^Symfony\\Component\\Console\\.* + - type: classLike + value: ^Symfony\\Component\\Console\\.* - name: Other Vendors collectors: - type: bool must: # must be outside of global namespace - - type: className - regex: '[\\]+' + - type: classLike + value: '[\\]+' must_not: # must not be one of the known vendors - - type: className - regex: ^Zalas\\Toolbox\\(Cli|Json|Runner|Tool|UseCase)\\.* - - type: className - regex: ^Psr\\Container\\.* - - type: className - regex: ^Symfony\\Component\\Console\\.* + - type: classLike + value: ^Zalas\\Toolbox\\(Cli|Json|Runner|Tool|UseCase)\\.* + - type: classLike + value: ^Psr\\Container\\.* + - type: classLike + value: ^Symfony\\Component\\Console\\.* ruleset: Cli: - Tool