Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 09e301d

Browse filesBrowse files
committed
make project_dir configurable
- add project_dir to configurable options in composer extra.runtime
1 parent 647dba0 commit 09e301d
Copy full SHA for 09e301d

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Runtime/Internal/ComposerPlugin.php
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.