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

Promote to top-level namespace #2

Merged

Conversation

weierophinney
Copy link
Member

This patch is in preparation for a v3 release of zend-router, and accomplishes the following.

Top-level namespace

The namespace has been promoted from Zend\Mvc\Router to Zend\Router, and all classes updated accordingly.

Removal of Console routes

Console routing has been removed (it will be in a forthcoming zend-mvc-console repository, which is currently in progress).

Removal of deprecated functionality

Deprecated functionality was removed, specifically the Query route.

Standalone component

This PR will supercede #1, and prepares the component to work standalone. This includes:

  • Importing all existing service factories from zend-mvc related to routing, refactoring them to the new namespace and removing console-awareness, and pushing them into the appropriate subcomponent namespaces.
  • Testing all service factories.
  • Adding a generic invokable ConfigProvider class for providing basic configuration (primarily dependency mapping); this is for use with expressive-config-manager and thus zend-expressive-zendrouter.
  • Adding a generic Module class with a getConfig() method that delegates to ConfigProvider to provide zend-mvc-compatible configuration.

Switching CS tooling

Finally, this patch also swaps php-cs-fixer for phpcs, and ensures all classes comply.

Instead of using the original `Zend\Mvc\Router` namespace, this patch rewrites
the component to use `Zend\Router` as the top-level namespace, mirroring the
component name, and de-coupling it from zend-mvc.

Additionally, it makes the decision that the component should only provide
HTTP-based routing; an upcoming repository, zend-mvc-console, will contain all
console-specific routing functionality.

Finally, it removes deprecated functionality, specifically the Query route.
Import factories and related tests from zend-mvc
------------------------------------------------

The patch imports the existing service factories and tests for routing related
services from zend-mvc, in preparation for making this a standalone module.

Added ConfigProvider and Module classes
---------------------------------------

Generic `ConfigProvider` for use with expressive-config-manager;
provides dependency information, as well as expected key for
`RoutePluginManager` configuration.

`Module` for integration with zend-mvc. Returns configuration only at
this time, and does so by calling on the `ConfigProvider`, and munging
keys to suit zend-mvc-based applications.
@weierophinney weierophinney merged commit 20e9b26 into zendframework:develop Mar 21, 2016
weierophinney added a commit that referenced this pull request Mar 21, 2016
weierophinney added a commit that referenced this pull request Mar 21, 2016
@weierophinney weierophinney deleted the feature/top-level-namespace branch March 21, 2016 13:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant