Skip to content

Commit

Permalink
Run CI on PHP83 and merge PHPStan configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosas committed Mar 3, 2024
2 parents 1bd0e36 + f1ecc12 commit 3e94a4a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 55 deletions.
51 changes: 7 additions & 44 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
dependencies:
- "highest"
steps:
Expand Down Expand Up @@ -52,44 +49,8 @@ jobs:
- name: "Run friendsofphp/php-cs-fixer"
run: "vendor/bin/php-cs-fixer check --config ./ci/php-cs-fixer.php"

architecture-analysis:
name: "Architecture analysis"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
dependencies:
- "highest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
- name: "Determine composer cache directory"
uses: "./.github/actions/composer/composer/determine-cache-directory"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "./.github/actions/composer/composer/install"
with:
dependencies: "${{ matrix.dependencies }}"
- name: "Run phpstan+phpat for architecture tests"
run: "vendor/bin/phpstan analyse -c ci/phpstan-phpat.neon"

static-code-analysis:
name: "Static Code Analysis"
name: "Static Code and Architecture analysis"
runs-on: "ubuntu-latest"
strategy:
matrix:
Expand All @@ -98,6 +59,7 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
dependencies:
- "highest"
steps:
Expand All @@ -121,9 +83,9 @@ jobs:
uses: "./.github/actions/composer/composer/install"
with:
dependencies: "${{ matrix.dependencies }}"
- name: "Run phpstan/phpstan"
run: "vendor/bin/phpstan analyse -c ci/phpstan.neon"
- name: "Run vimeo/psalm"
- name: "Run phpstan+phpat"
run: "vendor/bin/phpstan analyse -c ci/phpstan-phpat.neon"
- name: "Run psalm"
run: "vendor/bin/psalm -c ci/psalm.xml"

tests:
Expand All @@ -136,6 +98,7 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
dependencies:
- "highest"
steps:
Expand Down
7 changes: 6 additions & 1 deletion ci/phpstan-phpat.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ includes:
- ../extension.neon

parameters:
level: 0
level: 8
paths:
- ../src
- ../tests/unit/rules
- ../tests/architecture
ignoreErrors:
-
message: "#no value type specified in iterable type array\\.$#"
path: *
phpat:
ignore_built_in_classes: false
show_rule_names: true
Expand Down
9 changes: 0 additions & 9 deletions ci/phpstan.neon

This file was deleted.

1 change: 0 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ There are several ways to help out:
```bash
composer validate --strict
vendor/bin/php-cs-fixer fix --config ./ci/php-cs-fixer.php
vendor/bin/phpstan analyse -c ci/phpstan.neon
vendor/bin/phpstan analyse -c ci/phpstan-phpat.neon
vendor/bin/psalm -c ci/psalm.xml
vendor/bin/phpunit tests/unit/
Expand Down

0 comments on commit 3e94a4a

Please sign in to comment.