Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #642 regarding the route_to function and post routes #648

Merged

Conversation

daylightstudio
Copy link
Contributor

The following pull request changes the RouteCollection class to allow for the route_to function to work on routes other then get requests. The fix was to add an additional nested key to the $routes array for the HTTPVerb (e.g. $this->routes['post']['my_route']). For those routes without a verb specified, a wild card "*" is used.

A single test was added to check that the reverseRoutes method works with a post route which is what the route_to function is a wrapper around.

David McReynolds added 2 commits August 2, 2017 16:56
…\Config\Paths()

This allows for changing of Path variables based on the environment when running tests.
@lonnieezell
Copy link
Member

Looks pretty good. The only thing I see immediately, is just that some additional tests for route matching may be in order, especially where different methods have the same $from but use different controller values.

@lonnieezell
Copy link
Member

@daylightstudio will you be able to add the additional tests for this?

@lonnieezell
Copy link
Member

Excellent. Thanks.

@lonnieezell lonnieezell merged commit 22f7bbe into codeigniter4:develop Aug 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants