-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Get an abstract defined service from an alias #5752
Conversation
When you want to get a service leading to to an abstract factory from an alias.
Hey @jmleroux, can you provide unit tests ? |
I can't run ServiceManager test group. How can i run ServiceManager group ? My try :
|
…actFactoryWithAlias
Note : we would not have this problem without the |
This is not supported. I simply disallow service aliases for This is fixed with #5500 and won't land in 2.x |
OK, i'll do without. I used them a few times and found them useful |
@jmleroux not removing them, just pushing them out as "non-core" feature - they work exactly like before Aliases and normalization make work for abstract factories a real pain. The combination of the two is even worse :-) |
OK for ZF3. But my fix is a simple one and makes aliases work with abstract factory. |
I see that the problem has already been raised : #5535 |
Indeed, this solution is way simpler |
ping @Ocramius |
@jmleroux the PR looks good to me |
Get an abstract defined service from an alias
- multiline comment formatting, trailing whitespace
…ch-2 Get an abstract defined service from an alias
- multiline comment formatting, trailing whitespace
When you want to get a service leading to to an abstract factory from an alias.
I ended up with this issue when trying to get a cache instance wich i defined in my configuration :
The purpose is to be able to change the cache by changing the alias.
Without this PR, ZF try to create this service :
but 'cache_core' is not a cache configuration key.