Skip to content

Commit 63ef0a9

Browse files
committed
AutoloadSourceLocator - store the first included file
1 parent 2f49187 commit 63ef0a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Reflection/BetterReflection/SourceLocator/FileReadTrapStreamWrapper.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ public static function withStreamWrapperOverride(
9393
*/
9494
public function stream_open($path, $mode, $options, &$openedPath): bool
9595
{
96-
self::$autoloadLocatedFile = $path;
96+
if (self::$autoloadLocatedFile === null) {
97+
self::$autoloadLocatedFile = $path;
98+
}
9799
$this->readFromFile = false;
98100
$this->seekPosition = 0;
99101

0 commit comments

Comments
 (0)