Skip to content

Add better handling for willImplement and willExtend call to fix issues with PHPStan 2.1.3 and 2.1.4 #278

Add better handling for willImplement and willExtend call to fix issues with PHPStan 2.1.3 and 2.1.4

Add better handling for willImplement and willExtend call to fix issues with PHPStan 2.1.3 and 2.1.4 #278

Workflow file for this run

# https://docs.github.com/en/actions
name: "Integrate"
on: # yamllint disable-line rule:truthy
pull_request: null
push:
branches:
- "master"
env:
PHP_EXTENSIONS: "mbstring"
jobs:
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.4"
dependencies:
- "locked"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Lint YAML files"
uses: "ibiqlik/[email protected]"
with:
config_file: ".yamllint.yaml"
file_or_dir: "."
strict: true
- name: "Install PHP with extensions"
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"
- uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
- name: "Run ergebnis/composer-normalize"
run: "composer normalize --ansi --dry-run"
- name: "Create cache directory for friendsofphp/php-cs-fixer"
run: "mkdir -p .build/php-cs-fixer"
- name: "Cache cache directory for friendsofphp/php-cs-fixer"
uses: "actions/cache@v4"
with:
path: ".build/php-cs-fixer"
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}"
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-"
- name: "Run friendsofphp/php-cs-fixer"
run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --dry-run --verbose"
static-code-analysis:
name: "Static Code Analysis"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
include:
- php-version: "7.4"
phpunit-version: "9.1.0"
dependencies: "locked"
- php-version: "8.0"
phpunit-version: "9.6.0"
dependencies: "highest"
- php-version: "8.1"
phpunit-version: "10.0"
dependencies: "highest"
- php-version: "8.2"
phpunit-version: "10.0"
dependencies: "highest"
- php-version: "8.3"
phpunit-version: "11.0"
dependencies: "highest"
- php-version: "8.4"
phpunit-version: "11.0"
dependencies: "highest"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Install PHP with extensions"
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
- name: "Require phpunit/phpunit:^${{ matrix.phpunit-version }}"
run: "composer require phpunit/phpunit:^${{ matrix.phpunit-version }} --ansi --dev --no-update"
- uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
- name: "Cache cache directory for phpstan/phpstan"
uses: "actions/cache@v4"
with:
path: ".build/phpstan"
key: "php-${{ matrix.php-version }}-phpstan-${{ github.sha }}"
restore-keys: "php-${{ matrix.php-version }}-phpstan-"
- name: "Show phpstan/phpstan version"
run: "vendor/bin/phpstan --ansi --version"
- name: "Show phpunit/phpunit version"
run: "vendor/bin/phpunit --version"
- name: "Run phpstan/phpstan with extension"
run: "vendor/bin/phpstan analyse --ansi --configuration=phpstan-with-extension.neon --memory-limit=-1"
- name: "Run phpstan/phpstan without extension"
run: "vendor/bin/phpstan analyse --ansi --configuration=phpstan-without-extension.neon --memory-limit=-1"
tests:
name: "Tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.4"
- "8.3"
- "8.2"
- "8.1"
- "8.0"
dependencies:
- "highest"
include:
- php-version: "7.4"
dependencies: "locked"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Install PHP with extensions"
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
- name: "Set up problem matchers for phpunit/phpunit"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\""
- uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
- name: "Run tests with phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=phpunit.xml"