-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix conflict between translator service in ZF2 and skeleton app #4410
Fix conflict between translator service in ZF2 and skeleton app #4410
Conversation
- Removes conflict with ZendSkeletonApplication, which defines a "translator" service already.
- s/translator/MvcTranslator/
- Aliasing to an "MvcTranslator" service, as defined in zendframework/zendframework#4410
Well, I don't like the "Mvc"-prefix, because we don't have these on any other service defined in zf2. So, good to merge :-( |
I think the problem is in |
@danizord agree, but.... |
@danizord as @prolic notes, if we don't make this change, anybody who used the skeleton app prior to 2.2 and who then updates to 2.2 will have a broken application. This is really the best way to go. Regarding why I'm using the name "MvcTranslator" -- it's because it's an MVC-specific factory that uses a version of the Translator that implements interfaces from multiple components. You can see a similar implementation in the aura.framework package. We could introduce a "framework" or "integration" component, but, for all intents and purposes, our MVC component is already that component. |
@weierophinney Got it. The "Zend\Integration" does not sound like a bad idea for the next release. |
Again, looks fine here. |
- Aliasing to an "MvcTranslator" service, as defined in zendframework/zendframework#4410
This fixes a conflict raised by #4391 and reported in zendframework/ZendSkeletonApplication#184 -- basically, the skeleton application was defining a "translator" factory already, which meant that with the changes on ZF2, we were creating a conflict for anybody upgrading their existing app to the latest master.
What this PR does is create a new "MvcTranslator" service, using the MVC's translator factory. This ensures the original translator factory continues to work, while allowing validators to work in a turn-key fashion.