You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is creating a default empty config for extension with no config. Remember that this is my bundle which is defining a default config with prepend mechanism. There is no config in my app.
However, prepend mechanism happens in parent::process($container); so after this code. This means that, at this point, my config is empty. Then, an empty config is added to the list of config to merge in enqueue-bundle extension:
I am trying to migrate from Sf4.1 to 4.2 so from enqueue 0.8 to 0.9.
I found a tricky behaviour with configuration that I am going to try to explain.
I have a bundle handling messaging for my apps where I define some enqueue config in the bundle:
That I inject to enqueue extension with a prepend in my bundle extension:
But that config is never used! Why? Because of a conjunction of things!
First is that code in
enqueue-bundle
:This is defining a standard configuration in case of an empty configuration.
Second, is this code in Symfony kernel:
This is creating a default empty config for extension with no config. Remember that this is my bundle which is defining a default config with prepend mechanism. There is no config in my app.
However, prepend mechanism happens in
parent::process($container);
so after this code. This means that, at this point, my config is empty. Then, an empty config is added to the list of config to merge inenqueue-bundle
extension:The bad news? Prepend add config before others to make it overridable:
This means that default config created by
MergeExtensionConfigurationPass
override the one of my bundle at config merge step! Finally, I have:I hope I have been clear in my explanations. Any thoughts on that?
The text was updated successfully, but these errors were encountered: