includes: #- vendor/phpstan/phpstan-strict-rules/rules.neon parameters: fileExtensions: - php - dist bootstrap: tests/phpstan/phpstan-bootstrap.php excludes_analyse: - system/src/Grav/Common/Errors/Resources/layout.html.php reportUnmatchedIgnoredErrors: false universalObjectCratesClasses: - Grav\Common\Config\Config - Grav\Common\Config\Languages - Grav\Common\Config\Setup - Grav\Common\Data\Data - Grav\Common\GPM\Common\Package - Grav\Common\GPM\Local\Package - Grav\Common\GPM\Remote\Package - Grav\Common\Session ignoreErrors: # Errors that needs some more thinking (design...) # Needed: full coverage (probably with admin plugin...) then redesign constructor - message: '#Grav\\Common\\GPM\\Remote\\GravCore::__construct\(\) does not call parent constructor from Grav\\Common\\GPM\\Remote\\AbstractPackageCollection#' path: 'system/src/Grav/Common/GPM/Remote/GravCore.php' # Needed: psr-17 (http-factories) support (through decorator or further investigations) - message: '#Call to an undefined static method Grav\\Framework\\Psr7\\Stream::create\(\).#' path: 'system/src/Grav/Framework/Form/FormFlashFile.php' # PSR-16 Exception interfaces do not extend \Throwable - '#PHPDoc tag \@throws with type Psr\\SimpleCache\\(CacheException|InvalidArgumentException) is not subtype of Throwable#' # Those errors are about plugins (need to find a better solution) - message: '#Call to static method sendEmail\(\) on an unknown class Grav\\Plugin\\Email\\Utils.#' path: 'system/src/Grav/Common/Scheduler/Job.php' # Can be ignored, after fopen there's always an $http_response_header locally available - message: '#Variable \$http_response_header in isset\(\) always exists and is not nullable.#' path: 'system/src/Grav/Common/GPM/Response.php' # Those errors can be ignored (they depends on installed extensions) - message: '#Instantiated class (Memcache|Memcached|Redis|RedisException) not found#' path: 'system/src/Grav/Common/Cache.php' - message: '#on an unknown class (Memcache|Memcached|Redis|RedisException)#' path: 'system/src/Grav/Common/Cache.php' - message: '#on an unknown class Collator#' path: 'system/src/Grav/Common/Page/Pages.php'