plugins.neon 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. includes:
  2. #- '../../vendor/phpstan/phpstan-strict-rules/rules.neon'
  3. - '../../vendor/phpstan/phpstan-deprecation-rules/rules.neon'
  4. parameters:
  5. fileExtensions:
  6. - php
  7. excludes_analyse:
  8. - %currentWorkingDirectory%/user/plugins/*/vendor/*
  9. - %currentWorkingDirectory%/user/plugins/*/tests/*
  10. - %currentWorkingDirectory%/user/plugins/gantry5/src/platforms
  11. - %currentWorkingDirectory%/user/plugins/gantry5/src/classes/Gantry/Framework/Services/ErrorServiceProvider.php
  12. bootstrapFiles:
  13. - plugins-bootstrap.php
  14. inferPrivatePropertyTypeFromConstructor: true
  15. reportUnmatchedIgnoredErrors: false
  16. # These checks are new in phpstan 0.12, ignore them for now.
  17. checkMissingIterableValueType: false
  18. checkGenericClassInNonGenericObjectType: false
  19. universalObjectCratesClasses:
  20. - Grav\Common\Config\Config
  21. - Grav\Common\Config\Languages
  22. - Grav\Common\Config\Setup
  23. - Grav\Common\Data\Data
  24. - Grav\Common\GPM\Common\Package
  25. - Grav\Common\GPM\Local\Package
  26. - Grav\Common\GPM\Remote\Package
  27. - Grav\Common\Session
  28. - Gantry\Component\Config\Config
  29. dynamicConstantNames:
  30. - GRAV_CLI
  31. - GANTRY_DEBUGGER
  32. - GANTRY5_DEBUG
  33. - GANTRY5_VERSION
  34. - GANTRY5_VERSION_DATE
  35. - GANTRY5_PLATFORM
  36. - GANTRY5_ROOT
  37. ignoreErrors:
  38. # New in phpstan 0.12, ignore them for now.
  39. - '#Unsafe usage of new static\(\)#'
  40. - '#Cannot instantiate interface Grav\\Framework\\#'
  41. # PSR-16 Exception interfaces do not extend \Throwable
  42. - '#PHPDoc tag \@throws with type (.*|)?Psr\\SimpleCache\\(CacheException|InvalidArgumentException)(|.*)? is not subtype of Throwable#'
  43. - '#Access to an undefined property RocketTheme\\Toolbox\\Event\\Event::#'
  44. - '#Instantiation of deprecated class RocketTheme\\Toolbox\\Event\\Event#'
  45. - '#extends deprecated class RocketTheme\\Toolbox\\Event\\Event#'
  46. - '#implements deprecated interface RocketTheme\\Toolbox\\Event\\EventSubscriberInterface#'
  47. - '#Call to method __construct\(\) of deprecated class RocketTheme\\Toolbox\\Event\\Event#'
  48. - '#Call to deprecated method (stopPropagation|isPropagationStopped)\(\) of class Symfony\\Component\\EventDispatcher\\Event#'
  49. - '#Call to an undefined method Grav\\Plugin\\ApartmentData\\Application\\Application::#'
  50. - '#Parameter \#1 \$lineNumberStyle of method ScssPhp\\ScssPhp\\Compiler::setLineNumberStyle\(\) expects string, int given#'
  51. # Deprecated event class
  52. - '#has typehint with deprecated class RocketTheme\\Toolbox\\Event\\Event#'