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

Continue fixing service casing issues #82

Merged
merged 6 commits into from
Feb 29, 2016

Conversation

weierophinney
Copy link
Member

This patch builds on #80 and takes a different approach: conditionally declaring aliases when under zend-servicemanager v3.

This approach:

  • solves issues of circular alias de-referencing
  • ensures that retrieval using different casing combinations will retrieve the same instance (declaring multiple factory entries breaks this)
  • keeps backwards compatibility (as common use case scenarios — specifically, fetching by Wordcase vs lowercase — continue to work)

samsonasik and others added 6 commits February 29, 2016 23:47
Fixes zendframework#78 : using uppercase for 'Application' service
- Because we register services under both the names 'application' and
  'Application' normally, we need to do both in tests as well.
- The various factories in ViewHelperManagerFactory were incorrect;
  `$services` as passed to each is guaranteed to be the application
  service manager instance, so the conditionals that were pulling the
  parent were unnecessary.
Updated the `ServiceListenerFactory` to conditionally add either
Titlecase or lowercase aliases under zend-servicemanager v3 for common
one-word factories (currently config, request, response, router, and
application). This avoids the circular alias issue under v2 (where the
normalized factory name ensures all cases match), while simultaneously
ensuring common usage scenarios continue to work (fetching by alternate
case).
@weierophinney weierophinney added this to the 2.7.0 milestone Feb 29, 2016
@weierophinney weierophinney merged commit a8c1a06 into zendframework:develop Feb 29, 2016
weierophinney added a commit that referenced this pull request Feb 29, 2016
weierophinney added a commit that referenced this pull request Feb 29, 2016
@weierophinney weierophinney deleted the hotfix/80 branch February 29, 2016 20:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants