Hotfix/4879 #5108

Closed
wants to merge 2 commits into
from

Projects

None yet

3 participants

@DASPRiD
Member
DASPRiD commented Sep 13, 2013

This PR fixes issue #4879. It introduces a dummy translator, which is used in case the user did not configure any translator. It also adds a general TranslatorInterface to be typehinted against in our internal code. This should not affect any user-code and thus be BC-safe.

@DASPRiD
Member
DASPRiD commented Sep 13, 2013

@weierophinney Apparently we can only have multiple interfaces declaring the same method as of PHP 5.3.9 – how are we going to tackle this?

@DASPRiD
Member
DASPRiD commented Sep 13, 2013

By the way, what I noticed while going through this. The entire idea of creating the ValidatorTranslatorInterface was going to get rid of a direct dependency on Zend\I18n. since the Zend\Mvc\Translator uses stuff from Zend\I18n though, we still have that dependency indirectly, which renders the ValidatorTranslatorInterface obsolete.

@DASPRiD
Member
DASPRiD commented Sep 16, 2013

Thinking about it, this problem can be easily solved by decorating the translator, instead of extending, what do you think, @weierophinney ?

@prolic prolic commented on the diff Sep 28, 2013
...dev/zf2/tests/ZendTest/Filter/_files/zipextracted.txt
@@ -0,0 +1 @@
+compress me
@prolic
prolic Sep 28, 2013 Contributor

added by the tests accidentally?

@weierophinney weierophinney commented on the diff Oct 22, 2013
library/Zend/Mvc/Service/TranslatorServiceFactory.php
@@ -22,7 +23,12 @@ class TranslatorServiceFactory extends I18nTranslatorServiceFactory
public function createService(ServiceLocatorInterface $serviceLocator)
{
// Configure the translator
- $config = $serviceLocator->get('Config');
+ $config = $serviceLocator->get('Config');
+
+ if (!isset($config['translator'])) {
+ return new DummyTranslator();
+ }
@weierophinney
weierophinney Oct 22, 2013 Member

We should likely do this for the MvcTranslator service, too.

@weierophinney
weierophinney Oct 22, 2013 Member

NM, this is the MvcTranslator service factory.

@weierophinney weierophinney added a commit that referenced this pull request Oct 22, 2013
@weierophinney weierophinney [#5108] Remove errant file
- should not have been committed
30cd60b
@weierophinney weierophinney added a commit that referenced this pull request Oct 22, 2013
@weierophinney weierophinney Merge branch 'feature/5108' into develop
Close #5108
5017af8
@weierophinney
Member

Merged to develop for release with 2.3.0.

@weierophinney weierophinney added a commit to weierophinney/zendframework that referenced this pull request Nov 5, 2013
@weierophinney weierophinney Revert "Merge branch 'feature/5108' into develop"
Reverts PR #5108

This reverts commit 5017af8, reversing
changes made to c23c250.

The reason this is being reverted is because the solution does not work on
5.3.3; in fact, it will only work starting with version 5.3.9. Until we can
either up the minimum required PHP version or come up with an alternate
approach, this changeset cannot be included in a release.
b83d769
@weierophinney weierophinney added a commit to weierophinney/zendframework that referenced this pull request Nov 5, 2013
@weierophinney weierophinney Fixes test failure in Breadcrumbs view helper
- Originally included in merge for #5108
77936df
@weierophinney weierophinney added a commit that referenced this pull request Nov 5, 2013
@weierophinney weierophinney Merge branch 'hotfix/revert-5108' into develop
Reverts #5108 (hopefully temporarily)
93f0760
@weierophinney
Member

Re-opening, as the current situation leads to a broken develop branch, unless we up the PHP version. Looking into an alternate solution with @DASPRiD.

@weierophinney weierophinney reopened this Nov 5, 2013
@weierophinney weierophinney added a commit that referenced this pull request Jan 3, 2014
@weierophinney weierophinney Merge branch 'feature/5406' into develop
Close #5406
Fixes #5108
2fb32fe
@weierophinney
Member

Fixed with #5406

@babalugats76 babalugats76 referenced this pull request in aws/aws-sdk-php-zf2 Apr 19, 2014
Closed

Compatibility with ZF2 2.3 #18

@weierophinney weierophinney added a commit to zendframework/zend-config that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge pull request zendframework/zendframework#5108 from DASPRiD/hotf…
…ix/4879

Hotfix/4879
1d4f138
@weierophinney weierophinney added a commit to zendframework/zend-config that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'feature/5108' into develop 6f8316f
@weierophinney weierophinney added a commit to zendframework/zend-config that referenced this pull request May 15, 2015
@weierophinney weierophinney Revert "Merge branch 'feature/5108' into develop"
Reverts PR zendframework/zendframework#5108

This reverts commit 5017af832b75d2bdf50f5ca26a8fb3c76782d9cd, reversing
changes made to c23c25099512244bb10773558310d5b6ec4de075.

The reason this is being reverted is because the solution does not work on
5.3.3; in fact, it will only work starting with version 5.3.9. Until we can
either up the minimum required PHP version or come up with an alternate
approach, this changeset cannot be included in a release.
4a51056
@weierophinney weierophinney added a commit to zendframework/zend-config that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'hotfix/revert-5108' into develop
Reverts zendframework/zendframework#5108 (hopefully temporarily)
f405d9e
@weierophinney weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge pull request zendframework/zendframework#5108 from DASPRiD/hotf…
…ix/4879

Hotfix/4879
fe46305
@weierophinney weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'feature/5108' into develop 7b9c0f0
@weierophinney weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
@weierophinney weierophinney Revert "Merge branch 'feature/5108' into develop"
Reverts PR zendframework/zendframework#5108

This reverts commit 5017af832b75d2bdf50f5ca26a8fb3c76782d9cd, reversing
changes made to c23c25099512244bb10773558310d5b6ec4de075.

The reason this is being reverted is because the solution does not work on
5.3.3; in fact, it will only work starting with version 5.3.9. Until we can
either up the minimum required PHP version or come up with an alternate
approach, this changeset cannot be included in a release.
0470378
@weierophinney weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'hotfix/revert-5108' into develop
Reverts zendframework/zendframework#5108 (hopefully temporarily)
a313570
@weierophinney weierophinney added a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge pull request zendframework/zendframework#5108 from DASPRiD/hotf…
…ix/4879

Hotfix/4879
255e52e
@weierophinney weierophinney added a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
@weierophinney weierophinney [zendframework/zendframework#5108] Remove errant file
- should not have been committed
a2a4d7a
@weierophinney weierophinney added a commit to zendframework/zend-file that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge pull request zendframework/zendframework#5108 from DASPRiD/hotf…
…ix/4879

Hotfix/4879
f2e0ee4
@weierophinney weierophinney added a commit to zendframework/zend-file that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'feature/5108' into develop 18d6e12
@weierophinney weierophinney added a commit to zendframework/zend-file that referenced this pull request May 15, 2015
@weierophinney weierophinney Revert "Merge branch 'feature/5108' into develop"
Reverts PR zendframework/zendframework#5108

This reverts commit 5017af832b75d2bdf50f5ca26a8fb3c76782d9cd, reversing
changes made to c23c25099512244bb10773558310d5b6ec4de075.

The reason this is being reverted is because the solution does not work on
5.3.3; in fact, it will only work starting with version 5.3.9. Until we can
either up the minimum required PHP version or come up with an alternate
approach, this changeset cannot be included in a release.
6fb2723
@weierophinney weierophinney added a commit to zendframework/zend-file that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'hotfix/revert-5108' into develop
Reverts zendframework/zendframework#5108 (hopefully temporarily)
286732f
@weierophinney weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge pull request zendframework/zendframework#5108 from DASPRiD/hotf…
…ix/4879

Hotfix/4879
f746755
@weierophinney weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'feature/5108' into develop 5024a72
@weierophinney weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
@weierophinney weierophinney Revert "Merge branch 'feature/5108' into develop"
Reverts PR zendframework/zendframework#5108

This reverts commit 5017af832b75d2bdf50f5ca26a8fb3c76782d9cd, reversing
changes made to c23c25099512244bb10773558310d5b6ec4de075.

The reason this is being reverted is because the solution does not work on
5.3.3; in fact, it will only work starting with version 5.3.9. Until we can
either up the minimum required PHP version or come up with an alternate
approach, this changeset cannot be included in a release.
0de16dd
@weierophinney weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
@weierophinney weierophinney Fixes test failure in Breadcrumbs view helper
- Originally included in merge for zendframework/zendframework#5108
0a2c571
@weierophinney weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'hotfix/revert-5108' into develop
Reverts zendframework/zendframework#5108 (hopefully temporarily)
1a12849
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment