This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 89
Ensure console (and controller!) usage works for v2 applications #81
Merged
weierophinney
merged 15 commits into
zendframework:develop
from
weierophinney:hotfix/console-usage
Feb 29, 2016
Merged
Ensure console (and controller!) usage works for v2 applications #81
weierophinney
merged 15 commits into
zendframework:develop
from
weierophinney:hotfix/console-usage
Feb 29, 2016
Commits on Feb 29, 2016
-
Ensure console router is selected correctly
v2 tests for `Console::isConsole()` to determine if the console router should be created; added code to the `RouterFactory::createService()` implementation to do that and overwrite the `$requestedName` when detected.
Configuration menu - View commit details
-
Copy full SHA for dbd5e1e - Browse repository at this point
Copy the full SHA dbd5e1eView commit details -
Re-implement ServiceLocatorAwareInterface in AbstractController
We originally removed the ServiceLocatorAwareInterface implementation from AbstractController when we were targeting a 3.0 release, but it needs to be present for a 2.7 release.
Configuration menu - View commit details
-
Copy full SHA for e740f89 - Browse repository at this point
Copy the full SHA e740f89View commit details -
Add service locator injection initializer to ControllerManager
This functionality was removed when we were targeting a v3 release, but needs to be re-added when targeting v2.7.
Configuration menu - View commit details
-
Copy full SHA for 46a4cd2 - Browse repository at this point
Copy the full SHA 46a4cd2View commit details -
Alias
console
toConsoleAdapter
- to allow retrieval with either `Console` or `console` as the service name.
Configuration menu - View commit details
-
Copy full SHA for 3091537 - Browse repository at this point
Copy the full SHA 3091537View commit details -
Configuration menu - View commit details
-
Copy full SHA for be0db28 - Browse repository at this point
Copy the full SHA be0db28View commit details -
Now that controllers re-implement ServiceLocatorAwareInterface, we get deprecation errors. By adding `PHPUnit_Framework_Error_Deprecated::$enabled = false` to the setup on these tests, we can eliminate having those cast to exceptions, and thus prevent them from marking tests as errored or failed.
Configuration menu - View commit details
-
Copy full SHA for be9c248 - Browse repository at this point
Copy the full SHA be9c248View commit details -
Duck-type ServiceLocatorAwareInterface
Since zend-servicemanager v3 does not define `ServiceLocatorAwareInterface`, then we cannot extend it and still support that release series. As such, `AbstractController` no longer explicitly implements it, but does so implicitly by defining the methods. The initializers in both `ServiceManagerConfig` and `ControllerManager` were updated to *also* look for the combination: - interface `ServiceLocatorAwareInterface` does not exist AND - method `setServiceLocator()` is present If that combination is present, the same behavior is retained, including the deprecation notices.
Configuration menu - View commit details
-
Copy full SHA for 5cb953e - Browse repository at this point
Copy the full SHA 5cb953eView commit details -
Exclude deprecation notices from more tests
After duck-typing the `ServiceLocatorAwareInterface` usage, two more tests showed failures due to deprecation notices; these have now been marked to exclude them.
Configuration menu - View commit details
-
Copy full SHA for 5a0aca1 - Browse repository at this point
Copy the full SHA 5a0aca1View commit details -
Configuration menu - View commit details
-
Copy full SHA for b97120e - Browse repository at this point
Copy the full SHA b97120eView commit details -
Test duck-typed ServiceLocatorAwareInterface initializers
Adds tests for both `ServiceManagerConfig` and `ControllerManager`, verifying that each can do duck-typed `ServiceLocatorAwareInterface` injection via the initializers they register.
Configuration menu - View commit details
-
Copy full SHA for eca3efc - Browse repository at this point
Copy the full SHA eca3efcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c79443 - Browse repository at this point
Copy the full SHA 9c79443View commit details -
Configuration menu - View commit details
-
Copy full SHA for 167bf67 - Browse repository at this point
Copy the full SHA 167bf67View commit details -
The test cases removed are tested implicitly when retrieving aliases; however, they can never be retrieved directly, as they will not resolve to fully qualified class names. (When retrieving by alias, the FQCN is passed as the "requested name", which is why the factory works ever.)
Configuration menu - View commit details
-
Copy full SHA for 7792a1e - Browse repository at this point
Copy the full SHA 7792a1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c4d7430 - Browse repository at this point
Copy the full SHA c4d7430View commit details -
Better ServiceLocatorAwareInterface duck typing
Do not check if ServiceLocatorAwareInterface exists, as that will skip the initializer when it does, but the instance does not implement it and *does* fit duck typing rules.
2Configuration menu - View commit details
-
Copy full SHA for 99e4212 - Browse repository at this point
Copy the full SHA 99e4212View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.