diff --git a/tests/phpstan/plugins-bootstrap.php b/tests/phpstan/plugins-bootstrap.php index 0126d28d6..6fe9dfa78 100644 --- a/tests/phpstan/plugins-bootstrap.php +++ b/tests/phpstan/plugins-bootstrap.php @@ -39,3 +39,11 @@ foreach ($iterator as $directory) { require $autoloader; } } + +define('GANTRY_DEBUGGER', true); +define('GANTRY5_DEBUG', true); +define('GANTRY5_PLATFORM', 'grav'); +define('GANTRY5_ROOT', rtrim(ROOT_DIR, '/')); +define('GANTRY5_VERSION', '@version@'); +define('GANTRY5_VERSION_DATE', '@versiondate@'); +define('GANTRYADMIN_PATH', ''); diff --git a/tests/phpstan/plugins.neon b/tests/phpstan/plugins.neon index 9b8d46c6d..5d3d7d831 100644 --- a/tests/phpstan/plugins.neon +++ b/tests/phpstan/plugins.neon @@ -7,6 +7,8 @@ parameters: excludes_analyse: - %currentWorkingDirectory%/user/plugins/*/vendor/* - %currentWorkingDirectory%/user/plugins/*/tests/* + - %currentWorkingDirectory%/user/plugins/gantry5/src/platforms + - %currentWorkingDirectory%/user/plugins/gantry5/src/classes/Gantry/Framework/Services/ErrorServiceProvider.php bootstrap: tests/phpstan/plugins-bootstrap.php reportUnmatchedIgnoredErrors: true universalObjectCratesClasses: @@ -18,3 +20,4 @@ parameters: - Grav\Common\GPM\Local\Package - Grav\Common\GPM\Remote\Package - Grav\Common\Session + - Gantry\Component\Config\Config