From ad8d0a2ab186186c70a0201354acb8e4046cdd0d Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Tue, 3 Dec 2019 19:29:04 +0200 Subject: [PATCH] Updated plugins phpstan to work with Gantry5 plugin --- tests/phpstan/plugins-bootstrap.php | 8 ++++++++ tests/phpstan/plugins.neon | 3 +++ 2 files changed, 11 insertions(+) diff --git a/tests/phpstan/plugins-bootstrap.php b/tests/phpstan/plugins-bootstrap.php index 8d5492971..3fffb2a45 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