diff --git a/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php b/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php index 4f49e2bf2684d..1df3075433598 100644 --- a/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php +++ b/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php @@ -74,7 +74,7 @@ public function updateAutoloadFile(): void } } - $projectDir = $fs->makePathRelative($projectDir, $vendorDir); + $projectDir = $fs->makePathRelative(realpath($projectDir.($extra['project_dir'] ?? '')), $vendorDir); $nestingLevel = 0; while (str_starts_with($projectDir, '../')) { @@ -90,7 +90,7 @@ public function updateAutoloadFile(): void $runtimeClass = $extra['class'] ?? SymfonyRuntime::class; - unset($extra['class'], $extra['autoload_template']); + unset($extra['class'], $extra['autoload_template'], $extra['project_dir']); $code = strtr(file_get_contents($autoloadTemplate), [ '%project_dir%' => $projectDir,
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: