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

Route options not processed in ApplicationFactory #118

Merged
merged 3 commits into from
Sep 3, 2015
Merged

Route options not processed in ApplicationFactory #118

merged 3 commits into from
Sep 3, 2015

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Aug 30, 2015

When a route instance is created by calling $app->route(...), that instance is automatically added to the router, which tries to process the route options.
The problem is that the ApplicationFactory sets the options after that, which makes the router ignore any option defined for the route.

Creating the route as a new Zend\Expressive\Router\Route instance and passing it to the $app->route(...) method after processing the options fixes this problem.

@acelaya acelaya changed the title Route options not processes in Applicationfactory Route options not processed in ApplicationFactory Aug 30, 2015
@acelaya
Copy link
Contributor Author

acelaya commented Aug 30, 2015

Tests are not passing. I'll fix them and try to create some that cover this case.

@@ -17,6 +17,7 @@
use Zend\Expressive\Exception;
use Zend\Expressive\Router\Aura as AuraRouter;
use Zend\Expressive\Router\RouterInterface;
use Zend\Expressive\Router\Route;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort the use statement, place Zend\Expressive\Router\Route before Zend\Expressive\Router\RouterInterface

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@weierophinney weierophinney added this to the 0.1.1 milestone Sep 3, 2015
@weierophinney weierophinney self-assigned this Sep 3, 2015
@weierophinney weierophinney merged commit 4d78ac1 into zendframework:master Sep 3, 2015
weierophinney added a commit that referenced this pull request Sep 3, 2015
Route options not processed in ApplicationFactory
weierophinney added a commit that referenced this pull request Sep 3, 2015
weierophinney added a commit that referenced this pull request Sep 3, 2015
weierophinney added a commit that referenced this pull request Sep 3, 2015
@acelaya acelaya deleted the acelaya-patch-2 branch October 13, 2015 12:01
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.

3 participants