Skip to content

[8.x] Do not use foundation helper on auth component #35727

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

Closed
wants to merge 1 commit into from
Closed

[8.x] Do not use foundation helper on auth component #35727

wants to merge 1 commit into from

Conversation

rodrigopedra
Copy link
Contributor

While skimming through closed issues, I saw that issue #35718 references PR #34808. From that PR code I noticed the EnsureEmailIsVerified uses the abort helper, but this class is from the Illuminate\Auth component which can be used outside of Laravel.

I searched for other places where the abort helper could be used and didn't found any.

I tried to replicate the same code from Illuminate\Foundation\Application@abort

@sebdesign
Copy link
Contributor

@rodrigopedra you should also check #34817. It seems that some foundation helpers are allowed (like abort) while some others are not. But I couldn't find documentation or feedback about the correct practices.

@GrahamCampbell
Copy link
Member

All foundation helpers should be avoided, where practical.

@taylorotwell
Copy link
Member

In general I allow them in middleware because I see middleware as very "Laravel integrated" and Laravel's middleware are not typically something that would be just dropped into another framework.

@rodrigopedra
Copy link
Contributor Author

Makes sense, thank you @taylorotwell for the heads up.

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.

4 participants