zendframework/zf2 — pull request #2220 by weierophinney (2012-08-22 19:58:32+00:00)
Title: Hotfix/servicemanager duplicate services

This PR solves the following problem:

- You have marked your service manager to allowOverride == true (such as in the plugin managers)
- You have defined a service using, for example, the name "foo"
- You have aliased this service to "bar"
- You then create a service named "bar"

Previously, if you then retrieved "bar", you'd still get "foo". This PR makes it so that you'll now get the service you created last.

This will work properly now when you call setInvokableClass(), setFactory(), or setService().