Skip to content

[10.x] authorize method may be removed if not used #9130

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

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

browner12
Copy link
Contributor

both removing the authorize() method, and returning true will result in the same behavior, so adding a comment to explain this is an option.

https://github.com/laravel/framework/blob/10.x/src/Illuminate/Foundation/Http/FormRequest.php#L190

I would even go so far as to say we should recommend removing the method, as it's less code to run through, but this is probably good enough to start.

both removing the `authorize()` method, and returning `true` will result in the same behavior, so adding a comment to explain this is an option.

https://github.com/laravel/framework/blob/10.x/src/Illuminate/Foundation/Http/FormRequest.php#L190

I would even go so far as to say we should *recommend* removing the method, as it's less code to run through, but this is probably good enough to start.
@taylorotwell taylorotwell merged commit 480c553 into laravel:10.x Nov 13, 2023
@browner12 browner12 deleted the AB-form-request-authorization branch November 13, 2023 18:12
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