-
Notifications
You must be signed in to change notification settings - Fork 90
Removed lowercase console alias from default service config #132
Conversation
An alias was added in the `ServiceListenerFactory` to add the lowercase aliases for `console` and `config`. This caused a `Zend\ServiceManager\Exception\InvalidServiceNameException` exception to be throw within the Zend\ServiceManager package when using the default configuration prior to v3.x. Within Zend\ServiceManager v3.x, the service manager has become case sensitive, meaning that this issue would be resolved. However, as v2.x normalises the aliases, it classifies `console` and `Console` as a duplicate key, and throws the aforementioned exception. This is a fix is only required as of v2.x of zend-mvc Added data provider tests for expected aliases for default config
|
I'm going at this from the opposite direction, because we want to standardize on |
|
Interestingly, under zend-servicemanager v2, I'm getting a |
|
Okay, discovered a few things:
Interestingly, once I did that, I no longer received any exceptions at all. So, I tried to reproduce this in a skeleton application. I did the following:
From there, I tried each of the following:
As such, I'm unable to reproduce the issue. Because we want to standardize on the lowercase versions of those two services for v3, I can't accept the PR as-is, as it breaks existing assumptions and integrations. If you can provide a way to reproduce the issue reliably, please create a new pull request with the test case. Thanks! |
|
Sounds good, thanks |
|
Hi, we are currently having this issue, too. An application is using the servicemanager 2.7.6 and the mvc 2.7. This combination should normally work, but with mvc 2.7.x the two new aliases results in the InvalidServiceNameException. Either the compatibility from 2.7 to servicemanager 2.7 should be removed or the aliases. Both cannot work together. |
|
@jg-development As noted, I cannot reproduce the issue. If you can provide me with specific details on how to reproduce it, I will re-open. At this point, I am not willing to make a change, as I know from the above tests that it works for both zend-servicemanager v2 and v3, but with the change suggested, will stop working for v3. Unless I have a way to reliably reproduce the issue, allowing me to debug, I have nothing more to work with. |
|
Hi, you can reproduce it with these steps: composer update etc. Greetings Jan |
An alias was added in the
ServiceListenerFactoryto add the lowercase aliases forconsoleandconfig. This caused aZend\ServiceManager\Exception\InvalidServiceNameExceptionexception to be throw within the Zend\ServiceManager package when using the default configuration prior to v3.x.Within Zend\ServiceManager v3.x, the service manager has become case sensitive, meaning that this issue would be resolved.
However, as v2.x normalises the aliases, it classifies
consoleandConsoleas a duplicate key, and throws the aforementioned exception.This is a fix is only required as of v2.x of zend-mvc
Added data provider tests for expected aliases for default config