Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Make I18n component completely optional for Mvc#5406

Merged
weierophinney merged 5 commits into
zendframework:developfrom
DASPRiD:bugfix/mvc-translator-wrapper
Jan 3, 2014
Merged

Make I18n component completely optional for Mvc#5406
weierophinney merged 5 commits into
zendframework:developfrom
DASPRiD:bugfix/mvc-translator-wrapper

Conversation

@DASPRiD
Copy link
Copy Markdown
Member

@DASPRiD DASPRiD commented Nov 2, 2013

Should be fully functional by now. Closes #5108

@ghost ghost assigned weierophinney Nov 2, 2013
Comment thread library/Zend/Mvc/I18n/Translator.php Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with this change is it means that the MvcTranslator can no longer be dropped in when you need a Translator instance.

I'm honestly not sure how to proceed, however -- if you create an interface in the Zend\I18n\Translator namespace, we then have the problem of PHP <= 5.3.8 not being able to allow implementing two interfaces with the same signature.

This begs a question, then: should we up our minimum required version starting with 2.3.0 to PHP 5.3.9? This might solve a number of lingering issues such as this one, as well as some with ArrayObject.

Could you start a thread on the dev mailing list asking about this?

@dphn
Copy link
Copy Markdown

dphn commented Dec 6, 2013

Excuse me, are just two question.

  • Why is translator not the traits?
  • Why do not php 5.4? All the same. It is inevitable, why small jumps. It will only upset users. I think it's better to make one big step.

@Ocramius
Copy link
Copy Markdown
Member

Ocramius commented Dec 6, 2013

@dphn ZF2 remainst 5.3 compatible - ZF3 is where we'd target 5.4. No breakage on that side within 2.x

@dphn
Copy link
Copy Markdown

dphn commented Dec 6, 2013

Now php 5.4 is even available for free hosting

@mpalourdio
Copy link
Copy Markdown
Contributor

yep, but not available by default on redhat like distros :( Even if alternative repos like Remi's ones are the first thing to implement when using CentOS IMHO

@dphn
Copy link
Copy Markdown

dphn commented Dec 6, 2013

What a pity! Have to wait until ZF ~ 2.7 - 2.8 But I think, a better one stride than several small ones.
P.S. http://linux.ioerror.us/2013/02/installing-php-5-4-11-on-centos-6-3

@weierophinney
Copy link
Copy Markdown
Member

@dphn Please keep discussion on the mailing list, not comments on the issue tracker.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue we should prefer the MvcTranslator over the Translator service here. The assumption is that the MvcTranslator service is the "bridge" implementation, and would be the one shared between all translator-aware services.

weierophinney added a commit that referenced this pull request Jan 3, 2014
Make I18n component completely optional for Mvc
weierophinney added a commit that referenced this pull request Jan 3, 2014
- Prefer the MvcTranslator service over the translator service
- Applied object calisthenics and removed nested conditionals
weierophinney added a commit that referenced this pull request Jan 3, 2014
@weierophinney weierophinney merged commit 64e4dc1 into zendframework:develop Jan 3, 2014
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am getting

Zend\ServiceManager\Exception\ServiceNotCreatedException
While attempting to create mvctranslator(alias: MvcTranslator) an invalid factory was registered for this instance type.

Should you not implement FactoryInterface?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, now it's an invalid factory.

weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
…ix/mvc-translator-wrapper

Make I18n component completely optional for Mvc
weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-file that referenced this pull request May 15, 2015
…ix/mvc-translator-wrapper

Make I18n component completely optional for Mvc
weierophinney added a commit to zendframework/zend-file that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
…ix/mvc-translator-wrapper

Make I18n component completely optional for Mvc
weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
- Prefer the MvcTranslator service over the translator service
- Applied object calisthenics and removed nested conditionals
weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants