diff --git a/build/build-preload.php b/build/build-preload.php index d12919768a9..8129619832f 100755 --- a/build/build-preload.php +++ b/build/build-preload.php @@ -51,6 +51,10 @@ final class PreloadBuilder declare(strict_types=1); +if (defined('__PHPSTAN_RUNNING__')) { + return; +} + CODE_SAMPLE; diff --git a/preload-split-package.php b/preload-split-package.php index f9f3527c37c..d2936f3bec3 100644 --- a/preload-split-package.php +++ b/preload-split-package.php @@ -2,6 +2,10 @@ declare(strict_types=1); +if (defined('__PHPSTAN_RUNNING__')) { + return; +} + require_once __DIR__ . '/../../../vendor/nikic/php-parser/lib/PhpParser/Node.php'; require_once __DIR__ . '/src/Contract/PhpParser/Node/StmtsAwareInterface.php'; require_once __DIR__ . '/../../../vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php'; diff --git a/preload.php b/preload.php index 7068cc5b820..792b74681ed 100644 --- a/preload.php +++ b/preload.php @@ -2,6 +2,10 @@ declare(strict_types=1); +if (defined('__PHPSTAN_RUNNING__')) { + return; +} + require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node.php'; require_once __DIR__ . '/src/Contract/PhpParser/Node/StmtsAwareInterface.php'; require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php';