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

Ensure console (and controller!) usage works for v2 applications #81

Merged

Commits on Feb 29, 2016

  1. 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.
    weierophinney committed Feb 29, 2016
    Configuration menu
    Copy the full SHA
    dbd5e1e View commit details
    Browse the repository at this point in the history
  2. 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.
    weierophinney committed Feb 29, 2016
    Configuration menu
    Copy the full SHA
    e740f89 View commit details
    Browse the repository at this point in the history
  3. 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.
    weierophinney committed Feb 29, 2016
    Configuration menu
    Copy the full SHA
    46a4cd2 View commit details
    Browse the repository at this point in the history
  4. Alias console to ConsoleAdapter

    - to allow retrieval with either `Console` or `console` as the service name.
    weierophinney committed Feb 29, 2016
    Configuration menu
    Copy the full SHA
    3091537 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    be0db28 View commit details
    Browse the repository at this point in the history
  6. Ignore deprecation errors

    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.
    weierophinney committed Feb 29, 2016
    Configuration menu
    Copy the full SHA
    be9c248 View commit details
    Browse the repository at this point in the history
  7. 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.
    weierophinney committed Feb 29, 2016
    Configuration menu
    Copy the full SHA
    5cb953e View commit details
    Browse the repository at this point in the history
  8. 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.
    weierophinney committed Feb 29, 2016
    Configuration menu
    Copy the full SHA
    5a0aca1 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b97120e View commit details
    Browse the repository at this point in the history
  10. 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.
    weierophinney committed Feb 29, 2016
    Configuration menu
    Copy the full SHA
    eca3efc View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    9c79443 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    167bf67 View commit details
    Browse the repository at this point in the history
  13. Removed invalid test cases

    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.)
    weierophinney committed Feb 29, 2016
    Configuration menu
    Copy the full SHA
    7792a1e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    c4d7430 View commit details
    Browse the repository at this point in the history
  15. 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.
    weierophinney committed Feb 29, 2016
    2 Configuration menu
    Copy the full SHA
    99e4212 View commit details
    Browse the repository at this point in the history