KnpLabs/KnpRadBundle — Issue #6: Using composition instead of inheritance for the template name parser
Author: stof
Created: 2012-02-22 10:16:26+00:00
State: open

Using composition instead of inheritance would be less intrusive by allowing to nest as many composed parser as needed.

the way to overwrite it can be seen here: https://github.com/BeSimple/BeSimpleI18nRoutingBundle/pull/6/files#diff-1 My refactoring is under MIT so you can use the compiler pass to adapt it to your need without any issue.
This will work at best if other bundles wanting to overwrite it also uses composition this way (and not a crappy way forcing to compose the FrameworkBundle service only) but it can work too with bundles using a dumb composition or using inheritance if you take care to apply KnpRadBundle after them (as KnpRad would then take care to do things cleanly)