Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build/build-preload.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ final class PreloadBuilder

declare(strict_types=1);

if (defined('__PHPSTAN_RUNNING__')) {
return;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it makes sense here though, as it's our internal script.

Copy link
Member Author

@samsonasik samsonasik Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is template file content, without this, next generate preload.php and preload-split-package.php will remove __PHPSTAN_RUNNING__ check, that cause conflict node class.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it


CODE_SAMPLE;

Expand Down
4 changes: 4 additions & 0 deletions preload-split-package.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 4 additions & 0 deletions preload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down