Skip to content

[Runtime] project_dir option in composer.json always overwritten in autoload_runtime.php #59954

@wickedOne

Description

@wickedOne

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      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