PHPStan fixes: `autoload_files`, and `ignoreErrors` (#8974)
* PHPStan: Remove autoload_files directive as it is not necessary anymore * PHPStan: Add error exclusions for sapi_windows_set_ctrl_handler function * PHPStan: Add error exclusions for ZipArchive::LIBZIP_VERSION * PHPStan: Require phpstan ^0.12.26 * Ensure zip ext is available on gh actions Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>pull/8982/head
parent
6d9bf42655
commit
d906ff12c9
|
@ -89,7 +89,7 @@ jobs:
|
|||
uses: "shivammathur/setup-php@v2"
|
||||
with:
|
||||
coverage: "none"
|
||||
extensions: "intl"
|
||||
extensions: "intl, zip"
|
||||
ini-values: "memory_limit=-1, phar.readonly=0"
|
||||
php-version: "${{ matrix.php-version }}"
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
uses: "shivammathur/setup-php@v2"
|
||||
with:
|
||||
coverage: "none"
|
||||
extensions: "intl"
|
||||
extensions: "intl, zip"
|
||||
ini-values: "memory_limit=-1"
|
||||
php-version: "${{ matrix.php-version }}"
|
||||
tools: "cs2pr"
|
||||
|
@ -52,5 +52,5 @@ jobs:
|
|||
|
||||
- name: Run PHPStan
|
||||
run: |
|
||||
bin/composer require --dev phpstan/phpstan:^0.12 phpunit/phpunit:^7.5 --with-all-dependencies
|
||||
bin/composer require --dev phpstan/phpstan:^0.12.26 phpunit/phpunit:^7.5 --with-all-dependencies
|
||||
vendor/bin/phpstan analyse --configuration=phpstan/config.neon || vendor/bin/phpstan analyse --configuration=phpstan/config.neon --error-format=checkstyle | cs2pr
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
parameters:
|
||||
level: 1
|
||||
autoload_files:
|
||||
- '../src/bootstrap.php'
|
||||
excludes_analyse:
|
||||
- '../tests/Composer/Test/Fixtures/*'
|
||||
- '../tests/Composer/Test/Autoload/Fixtures/*'
|
||||
|
@ -27,6 +25,10 @@ parameters:
|
|||
|
||||
# BC with older PHPUnit
|
||||
- '~^Call to an undefined static method PHPUnit\\Framework\\TestCase::setExpectedException\(\)\.$~'
|
||||
|
||||
# ZipArchive::* Class constants are already checked before use.
|
||||
- '~^Access to undefined constant ZipArchive::~'
|
||||
|
||||
paths:
|
||||
- ../src
|
||||
- ../tests
|
||||
|
|
Loading…
Reference in New Issue