diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 1ab8c24c1e..316c7bb660 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -142,6 +142,7 @@ jobs: ../../bin/phpstan analyze - script: | cd e2e/bug-15102b + composer install ../../bin/phpstan analyze - script: | cd e2e/bug-15102 diff --git a/e2e/bug-15102b/.gitignore b/e2e/bug-15102b/.gitignore new file mode 100644 index 0000000000..3a9875b460 --- /dev/null +++ b/e2e/bug-15102b/.gitignore @@ -0,0 +1,2 @@ +/vendor/ +composer.lock diff --git a/e2e/bug-15102b/bootstrap.php b/e2e/bug-15102b/bootstrap.php index f86d4b17ba..c97c5c80d2 100644 --- a/e2e/bug-15102b/bootstrap.php +++ b/e2e/bug-15102b/bootstrap.php @@ -1,9 +1,10 @@ getFileName(); + if ($functionFileName === false) { + return false; + } + // PHP canonicalises the path before it reaches a stream wrapper - a `/./` segment, a // symlinked directory or an include-path-relative name all arrive resolved - so the // trapped paths compare directly against get_included_files(). $includedFiles = get_included_files(); foreach ($locatedFiles as $locatedFile) { + if ($locatedFile !== $functionFileName) { + continue; + } + if (in_array($locatedFile, $includedFiles, true)) { return true; }