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

[11.x] Add unprocessableContent and update unprocessableEntity #51815

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

dwightwatson
Copy link
Contributor

I know you've mentioned on other PRs that you aren't accepting more of these status helpers, but this is a little different because it reflects a change made to HTTP.

It appears that RFC 9110 from June 2022 renamed HTTP 422 from Unprocessable Entity to Unprocessable Content, and this change is also reflected in the MDN docs.

For this reason I've added unprocessableContent as a new status helper and updated unprocessableEntity to point it.


Another option you might prefer (for consistency) is to instead add just unprocessable. The reason for this is that it would match assertUnprocessable. Happy to update the PR if you'd prefer that.

/**
* Determine if the response was a 422 "Unprocessable Content" response.
*
* @return bool
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add a @deprecated annotation here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Was thinking about the same

@taylorotwell taylorotwell merged commit ccdddaf into laravel:11.x Jun 17, 2024
30 checks passed
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