From 986c1474dfc84b67eebc40924c3f16e43d173301 Mon Sep 17 00:00:00 2001 From: Giovanni Piemontese <22853912+ynnoig@users.noreply.github.com> Date: Fri, 31 May 2024 18:10:00 +0200 Subject: [PATCH] chore(ci): remove old php versions in ci --- .github/workflows/ci.yml | 18 +++++++++--------- .php-cs-fixer.dist.php | 8 +++----- composer.json | 4 +++- phpunit.xml.dist | 10 +++++----- rector.php | 3 +-- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 707908f..f680be0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: CI / Static on: push: @@ -17,9 +17,6 @@ jobs: fail-fast: false matrix: php-version: [ - '7.4', - '8.0', - '8.1', '8.2', '8.3', ] @@ -31,7 +28,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} - coverage: none + coverage: pcov extensions: dom, libxml, simplexml tools: composer:v2 @@ -58,13 +55,16 @@ jobs: run: vendor/bin/parallel-lint src/ - name: Run CodeStyle checks - run: PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer check --allow-risky=yes --diff + run: composer run cs-check - name: Run PHPStan - run: vendor/bin/phpstan analyze -clear-result-cache -c phpstan.neon src/ --no-progress + run: composer run phpstan + + - name: Run Rector + run: composer run rector-check - name: Run Tests - run: vendor/bin/phpunit --testdox tests + run: composer run test - name: Run Security check - run: vendor/bin/security-checker security:check composer.lock + run: composer run security-check diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 2cc62b3..2fbf61e 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -4,13 +4,11 @@ use PhpCsFixer\Config; use PhpCsFixer\Finder; -use PhpCsFixer\Fixer\Comment\HeaderCommentFixer; -use PhpCsFixer\Fixer\FunctionNotation\NativeFunctionInvocationFixer; use PhpCsFixer\Runner\Parallel\ParallelConfig; $finder = Finder::create() - ->in(__DIR__.'/src') - ->in(__DIR__.'/tests') + ->in(__DIR__ . '/src') + ->in(__DIR__ . '/tests') ; $config = new Config(); @@ -26,7 +24,7 @@ '@Symfony' => true, '@Symfony:risky' => false, 'native_function_invocation' => [ - 'include' => [NativeFunctionInvocationFixer::SET_INTERNAL], + 'include' => ['@internal'], 'scope' => 'namespaced', 'strict' => false, ], diff --git a/composer.json b/composer.json index a09496f..cd95f49 100644 --- a/composer.json +++ b/composer.json @@ -64,7 +64,9 @@ "cs-check": "PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer check --diff", "cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --diff", "phpstan": "vendor/bin/phpstan analyze", - "rector": "vendor/bin/rector process" + "rector-check": "vendor/bin/rector process --dry-run", + "rector": "vendor/bin/rector process", + "security-check": "vendor/bin/security-checker security:check composer.lock" }, "config": { "allow-plugins": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5889b6e..df8747c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,10 @@ - - - - - + + + + + tests/ diff --git a/rector.php b/rector.php index 7a0c57e..385f821 100644 --- a/rector.php +++ b/rector.php @@ -23,5 +23,4 @@ SetList::INSTANCEOF, SetList::STRICT_BOOLEANS, ]) - ->withPhpSets() -; + ->withPhpSets();