-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Mvc\I18n\Translator -> setLocale #5942
Mvc\I18n\Translator -> setLocale #5942
Conversation
This happens if I try to set the locale for the translator service in the modules bootstrap event:
|
It just work on mine. can you show the 'service_manager' key on your |
@robintema Starting in 2.3.0, if you do not have any configuration defined under the The However, it's sounding like, at a minimum, we should have the |
Ping @DASPRiD -- please see previous comments in this issue. |
@samsonasik I have checked the new dev version on a project I am working on and not on a skeleton app. This is my service config which worked fine until the upgrade:
@weierophinney so I have to setup the translator in the config from now on to use the |
@robintema I'm not arguing that -- I'm actually explaining why it doesn't work. :) You don't have anything configured for a translator, so the |
@robintema Have you configured the translator programmaticaly instead via configuration? |
@DASPRiD I'm working up a PR. Returning the |
…< 2.3.0 - Only use the `DummyTranslator` if `ext/intl` is disabled, or if `'translator' => false` configuration is provided - If no translator configuration is provided, and ext/intl is enabled, use a `Zend\I18n\Translator\Translator` instance to seed the `Zend\Mvc\I18n\Translator`.
@DASPRiD Converted this issue to a pull request. The PR does the following:
The above retains previous behavior, and makes usage of the |
- so that travis will be able to build properly
That behaviour looks okay to me, approved. |
- When @ralphschindler ran using a PHP version that did not have ext/intl, these two tests failed. They should not run in that situation.
Merge branch 'hotfix/mvc-translator-bc' of git://github.com/weierophinney/zf2 into hotfix/5942 * 'hotfix/mvc-translator-bc' of git://github.com/weierophinney/zf2: [#5942] skip some tests when ext/intl is not present Use --prefer-source flag for composer [#5942] Ensure TranslatorServiceFactory remains BC with < 2.3.0
@DASPRiD yes, the translator is configured programmaticaly. |
Merge branch 'hotfix/mvc-translator-bc' of git://github.com/weierophinney/zf2 into hotfix/5942 * 'hotfix/mvc-translator-bc' of git://github.com/weierophinney/zf2: [zendframework/zendframework#5942] skip some tests when ext/intl is not present Use --prefer-source flag for composer [zendframework/zendframework#5942] Ensure TranslatorServiceFactory remains BC with < 2.3.0
Merge branch 'hotfix/5942' into develop * hotfix/5942: [zendframework/zendframework#5942] skip some tests when ext/intl is not present Use --prefer-source flag for composer [zendframework/zendframework#5942] Ensure TranslatorServiceFactory remains BC with < 2.3.0
Hi,
I have upgraded to 2.3 dev from 2.2.6 to test. It seems that the translator does not have the setLocale method anymore. Is this a known BC break?
Here is the error I got:
Regards,
Norbert.