From 676bf5c993462f33f4cc0e684ff4a766864fe734 Mon Sep 17 00:00:00 2001 From: Jan Nedbal Date: Tue, 23 Jan 2024 16:49:07 +0100 Subject: [PATCH] Replace composer-unused & composer-require-checker with shipmonk/composer-dependency-analyser --- .github/workflows/checks.yml | 31 ------------------------------- composer.json | 10 +++++++++- 2 files changed, 9 insertions(+), 32 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b492488..1535ab6 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -6,37 +6,6 @@ on: - "master" - "v[0-9]" jobs: - dependencies: - runs-on: ubuntu-latest - strategy: - fail-fast: false - steps: - - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - - - name: Install dependencies - run: composer install --no-progress --prefer-dist --no-interaction - - - - name: Install extra tools - run: | - wget -q https://github.com/composer-unused/composer-unused/releases/latest/download/composer-unused.phar - wget -q https://github.com/maglnet/ComposerRequireChecker/releases/download/4.5.0/composer-require-checker.phar - - - - name: Check unused dependencies - run: php composer-unused.phar --output-format=default - - - - name: Check shadow dependencies - run: php composer-require-checker.phar check composer.json - checks: runs-on: ubuntu-latest strategy: diff --git a/composer.json b/composer.json index 1de214d..4fbdfe7 100644 --- a/composer.json +++ b/composer.json @@ -10,12 +10,15 @@ }, "require-dev": { "doctrine/annotations": "^2.0.1", + "doctrine/dbal": "^2.10 || ^3.7", + "doctrine/event-manager": "^1.2 || ^2.0", "editorconfig-checker/editorconfig-checker": "^10.4.0", "ergebnis/composer-normalize": "^2.19.0", "phpstan/phpstan": "^1.10.50", "phpstan/phpstan-phpunit": "^1.3.15", "phpstan/phpstan-strict-rules": "^1.5.2", "phpunit/phpunit": "^8.5.36", + "shipmonk/composer-dependency-analyser": "^1.0", "slevomat/coding-standard": "^8.14.1" }, "autoload": { @@ -42,10 +45,15 @@ "@check:ec", "@check:cs", "@check:types", - "@check:tests" + "@check:tests", + "@check:dependencies" ], "check:composer": "composer normalize --dry-run --no-check-lock --no-update-lock", "check:cs": "phpcs", + "check:dependencies": [ + "composer dump-autoload --classmap-authoritative", + "composer-dependency-analyser" + ], "check:ec": "ec src tests", "check:tests": "phpunit -vvv tests", "check:types": "phpstan analyse -vvv",