Reputation: 2569
I have 2 bundle MyBundle1 and MyBundle2 , MyBundle2 inherits MyBundle1.
In /app/config/services.yml i have:
imports:
- resource: '@MyBundle1/Resources/config/services.yml'
- resource: '@MyBundle2/Resources/config/services.yml'
The problem is that '@MyBundle2/Resources/config/services.yml' will be considered as '@MyBundle1/Resources/config/services.yml' because it inherits it, so override its files.
My question is: How can I access to the real '@MyBundle2/Resources/config/services.yml', not the one rewritten ?
Thanks
Upvotes: 0
Views: 165
Reputation: 5857
The Symfony cookbook explains that Bundles override their parent Bundles resource files when
@MyBundle/...../services.yml
(the @-part) syntax.In order to have your Bundle not override your parent Bundles services you can use a different filename (eg. _services.yml
) or refer to it using the full path in your config.
Upvotes: 2