From 97fb226fa2786cefb8c0b8276b4adb92211471e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Le=C3=B3n?= <56183278+Sleon4@users.noreply.github.com> Date: Sun, 30 Nov 2025 08:55:23 -0500 Subject: [PATCH] Update php.yml --- .github/workflows/php.yml | 93 ++++++--------------------------------- 1 file changed, 13 insertions(+), 80 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 020e51e..21c26b5 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -107,11 +107,10 @@ jobs: fail-on-severity: critical license-check: true - code-analysis-php-stan: + static-code-analysis: runs-on: ubuntu-latest - name: PHPStan - needs: - - composer-validation + name: Static code analysis + needs: composer-validation steps: - name: Check out the repository @@ -137,41 +136,11 @@ jobs: key: php-vendor-${{ runner.os }}-${{ github.run_id }} restore-keys: php-vendor-${{ runner.os }}-${{ github.run_id }} - - name: PHPStan (Src) - run: php -d memory_limit=-1 vendor/bin/phpstan analyse --level max src - - - name: PHPStan (Tests) - run: php -d memory_limit=-1 vendor/bin/phpstan analyse --level max tests - - code-analysis-php-codesniffer: - runs-on: ubuntu-latest - name: PHPCodeSniffer - needs: - - composer-validation - - steps: - - name: Check out the repository - uses: actions/checkout@v4 - - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.4' - extensions: mbstring, gd, zip - - - name: Restore composer.lock from cache - uses: actions/cache@v4 - with: - path: composer.lock - key: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }} + - name: PHPLint (Src) + run: php -d memory_limit=-1 vendor/bin/phplint src - - name: Restore vendor directory from cache - uses: actions/cache@v4 - with: - path: vendor - key: php-vendor-${{ runner.os }}-${{ github.run_id }} - restore-keys: php-vendor-${{ runner.os }}-${{ github.run_id }} + - name: PHPLint (Tests) + run: php -d memory_limit=-1 vendor/bin/phplint tests - name: PHP CodeSniffer (Src) run: php -d memory_limit=-1 vendor/bin/phpcs --standard=PSR12 src @@ -179,49 +148,16 @@ jobs: - name: PHP CodeSniffer (Tests) run: php -d memory_limit=-1 vendor/bin/phpcs --standard=PSR12 tests - code-analysis-phplint: - runs-on: ubuntu-latest - name: PHPLint - needs: - - composer-validation - - steps: - - name: Check out the repository - uses: actions/checkout@v4 - - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.4' - extensions: mbstring, gd, zip - - - name: Restore composer.lock from cache - uses: actions/cache@v4 - with: - path: composer.lock - key: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - - - name: Restore vendor directory from cache - uses: actions/cache@v4 - with: - path: vendor - key: php-vendor-${{ runner.os }}-${{ github.run_id }} - restore-keys: php-vendor-${{ runner.os }}-${{ github.run_id }} - - - name: PHPLint (Src) - run: php -d memory_limit=-1 vendor/bin/phplint src + - name: PHPStan (Src) + run: php -d memory_limit=-1 vendor/bin/phpstan analyse --level 10 src - - name: PHPLint (Tests) - run: php -d memory_limit=-1 vendor/bin/phplint tests + - name: PHPStan (Test) + run: php -d memory_limit=-1 vendor/bin/phpstan analyse --level 10 tests tests-phpunit: runs-on: ubuntu-latest name: PHPUnit - needs: - - code-analysis-php-stan - - code-analysis-php-codesniffer - - code-analysis-phplint + needs: static-code-analysis steps: - name: Checkout repository @@ -268,10 +204,7 @@ jobs: tests-infection: runs-on: ubuntu-latest name: Infection - needs: - - code-analysis-php-stan - - code-analysis-php-codesniffer - - code-analysis-phplint + needs: static-code-analysis steps: - name: Checkout repository