mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Fix a few phpstan errors and add a php8+ baseline for the rest
This commit is contained in:
parent
a4a2b6da87
commit
0b3adc84da
12 changed files with 8916 additions and 9 deletions
8875
phpstan/baseline-8.1.neon
Normal file
8875
phpstan/baseline-8.1.neon
Normal file
File diff suppressed because it is too large
Load diff
|
@ -3,6 +3,7 @@ includes:
|
|||
- ../vendor/phpstan/phpstan-deprecation-rules/rules.neon
|
||||
- ../vendor/phpstan/phpstan-strict-rules/rules.neon
|
||||
- ./baseline.neon
|
||||
- ./ignore-by-php-version.neon.php
|
||||
|
||||
parameters:
|
||||
level: 8
|
||||
|
|
14
phpstan/ignore-by-php-version.neon.php
Normal file
14
phpstan/ignore-by-php-version.neon.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php declare(strict_types = 1);
|
||||
|
||||
use PHPStan\DependencyInjection\NeonAdapter;
|
||||
|
||||
$adapter = new NeonAdapter();
|
||||
|
||||
// more inspiration at https://github.com/phpstan/phpstan-src/blob/master/build/ignore-by-php-version.neon.php
|
||||
$config = [];
|
||||
if (PHP_VERSION_ID >= 80000) {
|
||||
$config = array_merge_recursive($config, $adapter->load(__DIR__ . '/baseline-8.1.neon'));
|
||||
}
|
||||
$config['parameters']['phpVersion'] = PHP_VERSION_ID;
|
||||
|
||||
return $config;
|
Loading…
Add table
Add a link
Reference in a new issue