Skip to content

Conversation

@mpdude
Copy link
Contributor

@mpdude mpdude commented Dec 3, 2025

I noticed a slight inconsistency in the docs when showing examples of using Constraint classes. In some examples, the class is used and shown with the short class name. In other cases, the Symfony\Component\Validator\Constraints namespace is used as Assert, and references being made as Assert\NotBlank and similar.

Personally, I like the Assert\ prefix, since it triggers the "ah, that's a constraint" wiring in my head, but I don't mind. Generally, I'd prefer consistency, since I noticed that this caused confusion in my team.

Additionally, this PR fixes a few places where we are still showing the use of array-based options instead of named arguments, a change that was made in 7.3.

@mpdude mpdude requested a review from xabbuh as a code owner December 3, 2025 12:40
@carsonbot carsonbot added this to the 7.3 milestone Dec 3, 2025
@carsonbot carsonbot changed the title Consistently use Assert\... when referring to assertions Consistently use Assert\... when referring to assertions Dec 3, 2025
@mpdude
Copy link
Contributor Author

mpdude commented Dec 3, 2025

Seems the code block checker does not support namespace-based imports, only direct class references?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants