diff --git a/.github/workflows/composer.yaml b/.github/workflows/composer.yaml index 03e606be..1b541aec 100644 --- a/.github/workflows/composer.yaml +++ b/.github/workflows/composer.yaml @@ -18,7 +18,7 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.3 coverage: none tools: composer:v2 ini-file: development @@ -32,8 +32,8 @@ jobs: - name: Composer normalize run: composer normalize --dry-run - require-checker: - name: Require-checker + dependency-analyser: + name: Dependency analyser runs-on: ubuntu-latest steps: @@ -43,7 +43,7 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.3 coverage: none tools: composer:v2 ini-file: development @@ -54,30 +54,5 @@ jobs: dependency-versions: highest composer-options: --prefer-dist --prefer-stable - - name: Composer require checker - run: vendor/bin/composer-require-checker - - unused: - name: Unused - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install PHP with extensions - uses: shivammathur/setup-php@v2 - with: - php-version: 8.1 - coverage: none - tools: composer:v2 - ini-file: development - - - name: Install Composer dependencies - uses: ramsey/composer-install@v2 - with: - dependency-versions: highest - composer-options: --prefer-dist --prefer-stable - - - name: Composer unused - run: vendor/bin/composer-unused + - name: Composer dependency analyser + run: vendor/bin/composer-dependency-analyser diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index bb93954d..0827c8d4 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -18,7 +18,7 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.3 coverage: none tools: composer:v2 ini-file: development @@ -43,7 +43,7 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.3 coverage: none tools: composer:v2 ini-file: development diff --git a/.github/workflows/mutation.yaml b/.github/workflows/mutation.yaml index 968ffdca..7d85150c 100644 --- a/.github/workflows/mutation.yaml +++ b/.github/workflows/mutation.yaml @@ -18,7 +18,7 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.3 coverage: pcov tools: composer:v2 ini-file: development diff --git a/.github/workflows/phar.yaml b/.github/workflows/phar.yaml index 706d288a..47fb342d 100644 --- a/.github/workflows/phar.yaml +++ b/.github/workflows/phar.yaml @@ -24,7 +24,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.2 + php-version: 8.3 ini-values: phar.readonly=0 tools: box coverage: none diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index 6464afba..9e1cd158 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -18,7 +18,7 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.3 coverage: none tools: composer:v2 ini-file: development @@ -43,7 +43,7 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.3 coverage: none tools: composer:v2 ini-file: development diff --git a/.github/workflows/test-os.yaml b/.github/workflows/test-os.yaml index d433a201..0a75ea3b 100644 --- a/.github/workflows/test-os.yaml +++ b/.github/workflows/test-os.yaml @@ -18,7 +18,7 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: 8.2 + php-version: 8.3 tools: composer:v2 ini-file: development @@ -42,7 +42,7 @@ jobs: - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: - php-version: 8.2 + php-version: 8.3 tools: composer:v2 ini-file: development diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7eab8573..0e863340 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -27,9 +27,9 @@ jobs: include: - php-version: 8.0 dependencies: lowest - - php-version: 8.2 + - php-version: 8.3 dependencies: highest - symfony-require: 7.0.* + symfony-require: 7.1.* steps: - name: Checkout @@ -49,7 +49,6 @@ jobs: composer config minimum-stability dev composer global config --no-plugins allow-plugins.symfony/flex true composer global require --no-progress --no-scripts --no-plugins symfony/flex - composer remove maglnet/composer-require-checker --dev --no-update - name: Install Composer dependencies ${{ matrix.dependencies }} uses: ramsey/composer-install@v2 diff --git a/Makefile b/Makefile index 3a5d867f..38eacffe 100644 --- a/Makefile +++ b/Makefile @@ -26,10 +26,6 @@ rector: vendor/bin/rector .PHONY: rector -checker: - vendor/bin/composer-require-checker -.PHONY: composer - -unused: - vendor/bin/composer-unused +composer: + vendor/bin/composer-dependency-analyser .PHONY: composer diff --git a/composer-dependency-analyser.php b/composer-dependency-analyser.php new file mode 100644 index 00000000..8e2638cb --- /dev/null +++ b/composer-dependency-analyser.php @@ -0,0 +1,26 @@ +addPathToScan(__DIR__.'/bin/twig-cs-fixer', isDev: false) + ->ignoreErrorsOnPackageAndPath( + 'symfony/twig-bridge', + __DIR__.'/src/Environment/StubbedEnvironment.php', + [ErrorType::DEV_DEPENDENCY_IN_PROD] + ) + ->ignoreErrorsOnPackageAndPath( + 'symfony/ux-twig-component', + __DIR__.'/src/Environment/StubbedEnvironment.php', + [ErrorType::DEV_DEPENDENCY_IN_PROD] + ) + ->ignoreErrorsOnPackageAndPath( + 'twig/cache-extra', + __DIR__.'/src/Environment/StubbedEnvironment.php', + [ErrorType::DEV_DEPENDENCY_IN_PROD] + ); diff --git a/composer-require-checker.json b/composer-require-checker.json deleted file mode 100644 index fb7ea966..00000000 --- a/composer-require-checker.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "scan-files" : ["bin/twig-cs-fixer"], - "symbol-whitelist" : [ - "Symfony\\Bridge\\Twig\\TokenParser\\DumpTokenParser", - "Symfony\\Bridge\\Twig\\TokenParser\\FormThemeTokenParser", - "Symfony\\Bridge\\Twig\\TokenParser\\StopwatchTokenParser", - "Symfony\\Bridge\\Twig\\TokenParser\\TransDefaultDomainTokenParser", - "Symfony\\Bridge\\Twig\\TokenParser\\TransTokenParser", - "Symfony\\UX\\TwigComponent\\Twig\\ComponentLexer", - "Symfony\\UX\\TwigComponent\\Twig\\ComponentTokenParser", - "Symfony\\UX\\TwigComponent\\Twig\\PropsTokenParser", - "Twig\\Extra\\Cache\\TokenParser\\CacheTokenParser" - ] -} diff --git a/composer.json b/composer.json index 4b1597a7..a96f8962 100644 --- a/composer.json +++ b/composer.json @@ -22,12 +22,11 @@ "webmozart/assert": "^1.10" }, "require-dev": { + "composer/semver": "3.4.2", "dereuromark/composer-prefer-lowest": "^0.1.10", "ergebnis/composer-normalize": "^2.29", "friendsofphp/php-cs-fixer": "^3.13.0", - "icanhazstring/composer-unused": "^0.8.5", "infection/infection": "^0.26.16 || ^0.27.0", - "maglnet/composer-require-checker": "^3.8 || ^4.3", "phpstan/phpstan": "^1.9.1", "phpstan/phpstan-phpunit": "^1.2.2", "phpstan/phpstan-strict-rules": "^1.4.4", @@ -37,6 +36,7 @@ "psalm/plugin-phpunit": "^0.18.4", "psalm/plugin-symfony": "^5.0.0", "rector/rector": "^1.0.0", + "shipmonk/composer-dependency-analyser": "^1.6", "symfony/process": "^5.4 || ^6.0 || ^7.0", "symfony/twig-bridge": "^5.4 || ^6.0 || ^7.0", "symfony/ux-twig-component": "^2.2.0", diff --git a/phpstan.neon b/phpstan.neon index 690c7515..fd3fa350 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -8,7 +8,7 @@ includes: - vendor/phpstan/phpstan/conf/bleedingEdge.neon parameters: - phpVersion: 80200 + phpVersion: 80300 tmpDir: /tmp/phpstan level: max paths: diff --git a/psalm.xml b/psalm.xml index 37117a49..5565de1d 100644 --- a/psalm.xml +++ b/psalm.xml @@ -3,7 +3,7 @@ xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" errorLevel="1" - phpVersion="8.2" + phpVersion="8.3" strictBinaryOperands="true" rememberPropertyAssignmentsAfterCall="false" checkForThrowsDocblock="true"