-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Runtime] Make project_dir configurable #59974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 6.4
Are you sure you want to change the base?
Conversation
Hey! Thanks for your PR. You are targeting branch "7.3" but it seems your PR description refers to branch "6.4". Cheers! Carsonbot |
- add project_dir to configurable options in composer extra.runtime
ffbd495
to
09e301d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be tested?
Note that this should target 7.3 as it's an improvement, not a butfix
@@ -74,7 +74,7 @@ public function updateAutoloadFile(): void | ||
} | ||
} | ||
|
||
$projectDir = $fs->makePathRelative($projectDir, $vendorDir); | ||
$projectDir = $fs->makePathRelative(realpath($projectDir.($extra['project_dir'] ?? '')), $vendorDir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't this miss a /
?
$projectDir = $fs->makePathRelative(realpath($projectDir.($extra['project_dir'] ?? '')), $vendorDir); | |
$projectDir = $fs->makePathRelative(realpath($projectDir.'/'.($extra['project_dir'] ?? '')), $vendorDir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that makes sense
i'm not entirely sure as the plugin uses a lot of built in functions with regards to directory / file locations and a static method to retrieve a composer config.... would you guys even be open to have a dev depdency like vfsStream?
check |
this would allow a
composer.json
file at/alternative/location/composer.json
be configured withwhile using
generate a
autoload_runtime.php
with the followingproject_dir
i did not meddle with the autoload template discovery as that's currently already configurable and would introduce a bc break. also it makes sense in a way that every config value is relative to the composer.json file itself