-
Notifications
You must be signed in to change notification settings - Fork 94
[SYMFONY73] replace regex to new Slug constraint #723
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
Comments
Sounds good. Can you send the rule? 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I saw https://symfony.com/blog/new-in-symfony-7-3-slug-and-twig-constraints#slug-constraint where we have a Slug constraint we can replace regex's constrants that have
/^[a-z0-9]+(?:-[a-z0-9]+)*$/
with slug constraint. Might be a specific replacement but maybe worth it?I see its used public 25 times: https://github.com/search?q=%23%5BAssert%5CRegex%28%27%2F%5E%5Ba-z0-9%5D%2B%28%3F%3A-%5Ba-z0-9%5D%2B%29+*%24%2F%27%29%5D&type=code
The text was updated successfully, but these errors were encountered: