Skip to content

Commit 8c3e20e

Browse files
bug symfony#58067 [Runtime] fix ComposerPlugin (lyrixx)
This PR was merged into the 7.2 branch. Discussion ---------- [Runtime] fix ComposerPlugin | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 0ff2d73 [Runtime] fix ComposerPlugin
2 parents 310fc6a + 0ff2d73 commit 8c3e20e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Runtime/Internal/ComposerPlugin.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ public function updateAutoloadFile(): void
8282
$projectDir = substr($projectDir, 3);
8383
}
8484

85+
// the hack about __DIR__ is required because composer pre-processes plugins
8586
if (!$nestingLevel) {
86-
$projectDir = '__DIR__.'.var_export('/'.$projectDir, true);
87+
$projectDir = '__'.'DIR__.'.var_export('/'.$projectDir, true);
8788
} else {
8889
$projectDir = 'dirname(__'."DIR__, $nestingLevel)".('' !== $projectDir ? '.'.var_export('/'.$projectDir, true) : '');
8990
}

0 commit comments

Comments
 (0)