ACs
ACs

Reputation: 1445

How to configure a bundle from another bundle in Symfony 3.4?

I have a bundle in Symfony. I'd like to make this bundle change the configuration of other bundles. For example I'd like to set Doctrine's default naming strategy or make custom monolog logger configurations used by my bundle. The point is that when I require my bundle into a project I don't want to make these configurations in the app/config.yml, because my bundle will allways use these specific configurations.

Upvotes: 1

Views: 1065

Answers (1)

P. R. Ribeiro
P. R. Ribeiro

Reputation: 3029

You should use the PrependExtensionInterface as explained in the docs https://symfony.com/doc/current/bundles/prepend_extension.html .

Upvotes: 1

Related Questions