Skip to content

[Config] Dumped config builders in cache dir when defining a custom kernel.build_dir #51582

Closed
@HeahDude

Description

@HeahDude

Symfony version(s) affected

6.4

Description

I tried to play with config builders.

The initial PR states:

This PR will build classes and store them in the build_dir. The classes will help you write PHP config. It will basically generate an array for you.

When I use the defaults, the build dir is the same as the cache dir and all builders are compiled in var/cache/dev/Symfony/ as expected.

When I use a custom build dir, only the FrameworkBundle config builders are compiled in build/Symfony/, but for all other bundles they are still compiled in cache dir, including duplicates for the framework bundle ones.

How to reproduce

Override the Kernel::getBuildDir() method and clear the cache in any Symfony application.

Possible Solution

I did not invest more time to find out where it comes from as I don't know this part of the internals.
If someone has a better understanding of this feature, I'll be glad to have some heads-up, otherwise I'll try to have a look this week-end.

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