Skip to content

Commit ffbd495

Browse files
committed
make project_dir configurable
- add project_dir to configurable options in composer extra.runtime
1 parent 647dba0 commit ffbd495

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function updateAutoloadFile(): void
7474
}
7575
}
7676

77-
$projectDir = $fs->makePathRelative($projectDir, $vendorDir);
77+
$projectDir = $fs->makePathRelative(realpath($projectDir.$extra['project_dir'] ?? ''), $vendorDir);
7878
$nestingLevel = 0;
7979

8080
while (str_starts_with($projectDir, '../')) {
@@ -90,7 +90,7 @@ public function updateAutoloadFile(): void
9090

9191
$runtimeClass = $extra['class'] ?? SymfonyRuntime::class;
9292

93-
unset($extra['class'], $extra['autoload_template']);
93+
unset($extra['class'], $extra['autoload_template'], $extra['project_dir']);
9494

9595
$code = strtr(file_get_contents($autoloadTemplate), [
9696
'%project_dir%' => $projectDir,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

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:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy