config.neon 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. parameters:
  2. level: 1
  3. autoload_files:
  4. - autoload.php
  5. excludes_analyse:
  6. - '../tests/Composer/Test/Fixtures/*'
  7. - '../tests/Composer/Test/Autoload/Fixtures/*'
  8. - '../tests/Composer/Test/Plugin/Fixtures/*'
  9. ignoreErrors:
  10. # unused parameters
  11. - '~^Constructor of class Composer\\Repository\\VcsRepository has an unused parameter \$dispatcher\.$~'
  12. - '~^Constructor of class Composer\\Util\\Http\\CurlDownloader has an unused parameter \$disableTls\.$~'
  13. - '~^Constructor of class Composer\\Util\\Http\\CurlDownloader has an unused parameter \$options\.$~'
  14. # ion cube is not installed
  15. - '~^Function ioncube_loader_\w+ not found\.$~'
  16. # variables from global scope
  17. - '~^Undefined variable: \$vendorDir$~'
  18. - '~^Undefined variable: \$baseDir$~'
  19. # variable defined in eval
  20. - '~^Undefined variable: \$res$~'
  21. # erroneous detection of missing const, see https://github.com/phpstan/phpstan/issues/2960
  22. - '~^Access to undefined constant ZipArchive::LIBZIP_VERSION.$~'
  23. # we don't have different constructors for parent/child
  24. - '~^Unsafe usage of new static\(\)\.$~'
  25. # BC with older PHPUnit
  26. - '~^Call to an undefined static method PHPUnit\\Framework\\TestCase::setExpectedException\(\)\.$~'
  27. # hhvm should have support for $this in closures
  28. -
  29. count: 1
  30. message: '~^Using \$this inside anonymous function is prohibited because of PHP 5\.3 support\.$~'
  31. path: '../tests/Composer/Test/Repository/PlatformRepositoryTest.php'
  32. paths:
  33. - ../src
  34. - ../tests
  35. rules:
  36. - Composer\PHPStanRules\AnonymousFunctionWithThisRule