Open
Description
Symfony version(s) affected
6.4
Description
the runtime documentation suggests one can override the project_dir in the composer.json, however the generated autoload file will contain an option array with a duplicate key overriding that option when doing so.
How to reproduce
execute the following commands and inspect the vendor/autoload_runtime.php
file:
composer config extra.runtime.project_dir '/foo/bar/' && composer dump-autoload
Possible Solution
offending line
https://github.com/symfony/runtime/blob/8e8d09bd69b7f6c0260dd3d58f37bd4fbdeab5ad/Internal/ComposerPlugin.php#L99
could be changed to:
'%runtime_options%' => '['. substr(var_export(array_merge(['project_dir' => $projectDir], $extra), true), 7, -1)."]",
Additional Context
No response