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

[5.2] Fix an issue with fluent routes with uses() #13076

Merged
merged 1 commit into from
Apr 8, 2016
Merged

[5.2] Fix an issue with fluent routes with uses() #13076

merged 1 commit into from
Apr 8, 2016

Conversation

themsaid
Copy link
Member

@themsaid themsaid commented Apr 7, 2016

As reported in #13074.

This PR fixes the issue with routing using ->uses('Controller@method').

@@ -613,7 +613,7 @@ protected function mergeGroupAttributesIntoRoute($route)
* @param array $action
* @return bool
*/
protected function actionReferencesController($action)
public function actionReferencesController($action)
Copy link
Member

Choose a reason for hiding this comment

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

that change is breaking

Copy link
Member Author

Choose a reason for hiding this comment

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

hmmm, could you explain please? how changing the visibility to public can lead to breaking things? It's 1:00 AM here and I should probably go to sleep but this one is pretty confusing to me

Copy link
Member

Choose a reason for hiding this comment

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

protected methods can be overwritten by a parent class, and modifying the visibility to public will cause a fatal error if this method has been overwritten by parent class

Copy link
Member Author

Choose a reason for hiding this comment

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

I think you mean overwritten as protected by a child class, so yeah changing this to public will cause a fatal in case anyone is overwriting the Router. Alright, thanks for the notes 👍

@taylorotwell
Copy link
Member

Should we add a test case for this?

@themsaid
Copy link
Member Author

themsaid commented Apr 8, 2016

I've already added two tests to check for the controller action after using uses(), do you mean a full test for the fluent routes thing? middleware() & name()?

@taylorotwell taylorotwell merged commit 8535763 into laravel:5.2 Apr 8, 2016
@taylorotwell
Copy link
Member

Got it! Thanks

@themsaid themsaid deleted the fix-fluent-uses branch April 8, 2016 13:22
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.

3 participants