Skip to content

Commit

Permalink
Do not prefix __PHPSTAN_RUNNING__ constant
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 27, 2022
1 parent 0d39373 commit 7862a64
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/build/scoper.inc.php
Expand Up @@ -52,6 +52,12 @@ function (string $filePath, string $prefix, string $content): string {
}
return str_replace('__DIR__ . \'/..', '\'phar://phpstan.phar', $content);
},
function (string $filePath, string $prefix, string $content): string {
if ($filePath !== 'bin/phpstan') {
return $content;
}
return str_replace(sprintf('%s\\\\__PHPSTAN_RUNNING__', $prefix), '__PHPSTAN_RUNNING__', $content);
},
function (string $filePath, string $prefix, string $content): string {
if ($filePath !== 'vendor/nette/di/src/DI/Compiler.php') {
return $content;
Expand Down

0 comments on commit 7862a64

Please sign in to comment.