diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f41f12..22fe35b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,46 +7,34 @@ on: - cron: '0 0 1,16 * *' jobs: - tests: - name: PHP ${{ matrix.php }}, SF ${{ matrix.symfony }} - ${{ matrix.deps }} - runs-on: ubuntu-latest - strategy: - matrix: - php: [7.4, 8.0, 8.1] - deps: [hightest] - symfony: [5.4.*] - include: - - php: 7.4 - deps: lowest - symfony: '*' - - php: 8.0 - deps: highest - symfony: 6.0.* - - php: 8.1 - deps: highest - symfony: 6.0.* - - php: 8.1 - deps: highest - symfony: 6.1.* - steps: - - uses: zenstruck/.github@php-test-symfony - with: - php: ${{ matrix.php }} - symfony: ${{ matrix.symfony }} - deps: ${{ matrix.deps }} + test: + uses: zenstruck/.github/.github/workflows/php-test-symfony.yml@main code-coverage: uses: zenstruck/.github/.github/workflows/php-coverage-codecov.yml@main - with: - php: 8 composer-validate: uses: zenstruck/.github/.github/workflows/php-composer-validate.yml@main - cs-check: - uses: zenstruck/.github/.github/workflows/php-cs-fixer.yml@main - sca: uses: zenstruck/.github/.github/workflows/php-stan.yml@main - with: - php: 8.1 + + fixcs: + name: Run php-cs-fixer + needs: sync-with-template + if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} + runs-on: ubuntu-latest + steps: + - uses: zenstruck/.github@php-cs-fixer + with: + php: 7.4 + key: ${{ secrets.GPG_PRIVATE_KEY }} + + sync-with-template: + name: Sync meta files + if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} + runs-on: ubuntu-latest + steps: + - uses: zenstruck/.github@sync-with-template + with: + key: ${{ secrets.GPG_PRIVATE_KEY }} diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index eaae762..456e40a 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -41,8 +41,17 @@ 'remove_inheritdoc' => true, ], 'phpdoc_to_comment' => false, - 'function_declaration' => ['closure_function_spacing' => 'none'], + 'function_declaration' => ['closure_function_spacing' => 'none', 'closure_fn_spacing' => 'none'], 'nullable_type_declaration_for_default_null_value' => true, + 'phpdoc_separation' => ['groups' => [ + ['test', 'dataProvider', 'before', 'internal', 'after'], + ['template', 'implements', 'extends'], + ['phpstan-type', 'phpstan-import-type'], + ['deprecated', 'link', 'see', 'since'], + ['author', 'copyright', 'license', 'source'], + ['category', 'package', 'subpackage'], + ['property', 'property-read', 'property-write'], + ]], ]) ->setRiskyAllowed(true) ->setFinder($finder)