Skip to content

Commit 47be07a

Browse files
Merge branch '7.4' into 8.0
* 7.4: make project_dir configurable
2 parents e8f4811 + 5b90ac8 commit 47be07a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CHANGELOG
99
* Add automatic detection of FrankenPHP worker mode in `SymfonyRuntime`
1010
* Expose the runtime class in `$_SERVER['APP_RUNTIME']`
1111
* Expose the runtime options in `$_SERVER['APP_RUNTIME_OPTIONS']`
12+
* Make `project_dir` configurable in `composer.json`
1213

1314
6.4
1415
---

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, '../')) {
@@ -91,7 +91,7 @@ public function updateAutoloadFile(): void
9191

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

94-
unset($extra['class'], $extra['autoload_template']);
94+
unset($extra['class'], $extra['autoload_template'], $extra['project_dir']);
9595

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

0 commit comments

Comments
 (0)