Skip to content

Conversation

javiereguiluz
Copy link
Member

Fixes #21397.


// allows all protocols whose names are RFC 3986 compliant
// (e.g. 'https://', 'git+ssh://', 'file://', 'custom://')
protocols: ['*']
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should allow '*' (so a string without the need to wrap it in an array)

Copy link
Member

Choose a reason for hiding this comment

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

see #21406

protocols: ['*']

// regular expressions are also valid
protocols: ['https?', 'custom.*', 'my-app-.*']
Copy link
Member

Choose a reason for hiding this comment

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

Should we backport this to older branches?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't follow you. Is this available in older branches? I thought it was a new feature added in 7.4.

Copy link
Member

@xabbuh xabbuh Sep 24, 2025

Choose a reason for hiding this comment

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

Maybe then this actually doesn't work at all? Because the only change I see in symfony/symfony#60561 is a strict comparison with ['*']. The remaining behaviour of the validator didn't change.

javiereguiluz added a commit that referenced this pull request Sep 24, 2025
…` option (xabbuh)

This PR was merged into the 7.4 branch.

Discussion
----------

[Validator] rework the usage of `'*'` for the `protocols` option

following #21398, related to symfony/symfony#61826

Commits
-------

83a9025 rework the usage of '*' for the protocols option
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.

4 participants