Skip to content

feat: Allow a custom status code on ValidationApiProblem - #23

Merged
veewee merged 1 commit into
phpro:masterfrom
ElwynVdb:feat/validation-problem-status-code
Sep 14, 2026
Merged

veewee merged 1 commit into
phpro:masterfrom
ElwynVdb:feat/validation-problem-status-code

Conversation

@ElwynVdb

Copy link
Copy Markdown
Contributor

Improvement

Q A
Type improvement
BC Break no

Summary

Validation failures are not always a 400; 422 is just as common. The status code is now an optional constructor argument, defaulting to 400.

No range check on the value, since HttpApiProblem itself accepts any status code and guarding only this subclass would be inconsistent.

Validation failures are not always a 400; 422 is just as common. The
status code is now an optional constructor argument, defaulting to 400.

No range check on the value, since HttpApiProblem itself accepts any
status code and guarding only this subclass would be inconsistent.
@veewee
veewee merged commit d3b448e into phpro:master Sep 14, 2026
6 checks passed
@ElwynVdb
ElwynVdb deleted the feat/validation-problem-status-code branch September 15, 2026 04:39
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