Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
taylorotwell merged 1 commit into
laravel:5.2from
themsaid:fix-fluent-uses
Apr 8, 2016
Merged

[5.2] Fix an issue with fluent routes with uses()#13076
taylorotwell merged 1 commit into
laravel:5.2from
themsaid:fix-fluent-uses

Conversation

@themsaid
Copy link
Copy Markdown
Member

@themsaid themsaid commented Apr 7, 2016

As reported in #13074.

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

Comment thread src/Illuminate/Routing/Router.php Outdated
* @return bool
*/
protected function actionReferencesController($action)
public function actionReferencesController($action)
Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
Member

Should we add a test case for this?

@themsaid
Copy link
Copy Markdown
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
Copy Markdown
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