68 lines
2.6 KiB
Plaintext
68 lines
2.6 KiB
Plaintext
includes:
|
|
- ../vendor/phpstan/phpstan-phpunit/extension.neon
|
|
- ./baseline.neon
|
|
|
|
parameters:
|
|
level: 5
|
|
|
|
excludePaths:
|
|
- '../tests/Composer/Test/Fixtures/*'
|
|
- '../tests/Composer/Test/Autoload/Fixtures/*'
|
|
- '../tests/Composer/Test/Plugin/Fixtures/*'
|
|
- '../tests/Composer/Test/PolyfillTestCase.php'
|
|
|
|
reportUnmatchedIgnoredErrors: false
|
|
|
|
ignoreErrors:
|
|
# unused parameters
|
|
- '~^Constructor of class Composer\\Repository\\VcsRepository has an unused parameter \$dispatcher\.$~'
|
|
- '~^Constructor of class Composer\\Util\\Http\\CurlDownloader has an unused parameter \$disableTls\.$~'
|
|
- '~^Constructor of class Composer\\Util\\Http\\CurlDownloader has an unused parameter \$options\.$~'
|
|
|
|
# ion cube is not installed
|
|
- '~^Function ioncube_loader_\w+ not found\.$~'
|
|
|
|
# variables from global scope
|
|
- '~^Undefined variable: \$vendorDir$~'
|
|
- '~^Undefined variable: \$baseDir$~'
|
|
|
|
# variable defined in eval
|
|
- '~^Undefined variable: \$res$~'
|
|
|
|
# we don't have different constructors for parent/child
|
|
- '~^Unsafe usage of new static\(\)\.$~'
|
|
|
|
# BC with older PHPUnit
|
|
- '~^Call to an undefined static method Composer\\Test\\PolyfillTestCase::setExpectedException\(\)\.$~'
|
|
- '~^Call to an undefined method Composer\\Test\\[a-zA-Z0-9\\]+::(assertFileDoesNotExist|assertMatchesRegularExpression)\(\)\.$~'
|
|
|
|
# Mock errors
|
|
- '~^Call to an undefined method (PHPUnit\\Framework\\MockObject\\MockObject|Prophecy\\Prophecy\\ObjectProphecy)::.*$~'
|
|
|
|
# Ignore some irrelevant errors in test files
|
|
- '~Method Composer\\Test\\[^:]+::(setUp(BeforeClass)?|tearDown(AfterClass)?|test[^(]+)\(\) has no return typehint specified.~'
|
|
- '~Method Composer\\Test\\[^:]+::(data\w+|provide\w+|\w+Provider)\(\) has no return typehint specified.~'
|
|
|
|
# Level 6 TODO
|
|
#- '~parameter .*? with no typehint specified.$~'
|
|
#- '~parameter .*? with no value type specified in iterable type array.$~'
|
|
#- '~has no return typehint specified.$~'
|
|
#- '~return type has no value type specified in iterable type array.$~'
|
|
#- '~ignorePlatformReqs~'
|
|
|
|
bootstrapFiles:
|
|
- ../tests/bootstrap.php
|
|
|
|
paths:
|
|
- ../src
|
|
- ../tests
|
|
|
|
dynamicConstantNames:
|
|
- Composer\Composer::BRANCH_ALIAS_VERSION
|
|
- Composer\Composer::VERSION
|
|
- Composer\Composer::RELEASE_DATE
|
|
- Composer\Composer::SOURCE_VERSION
|
|
|
|
rules:
|
|
- Composer\PHPStanRules\AnonymousFunctionWithThisRule
|