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

[Validator] Add additional versions (*_NO_PUBLIC, *_ONLY_PRIV & *_ONLY_RES) in IP address & CIDR constraint #52658

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

Ninos
Copy link
Contributor

@Ninos Ninos commented Nov 20, 2023

Q A
Branch? 7.1
Bug fix? no
New feature? yes
Deprecations? no
License MIT

Possibility to allow no public, only private or only reserved ips.

  • Enhancement: Add *_NO_PUBLIC, *_ONLY_PRIV & *_ONLY_RES as possible versions in Ip constraint
  • Enhancement: Possibility to use all Ip versions in Cidr constraint

See also old MR: #51777

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

Almost GTM

src/Symfony/Component/Validator/CHANGELOG.md Outdated Show resolved Hide resolved
src/Symfony/Component/Validator/Constraints/Ip.php Outdated Show resolved Hide resolved
src/Symfony/Component/Validator/Constraints/Ip.php Outdated Show resolved Hide resolved
src/Symfony/Component/Validator/Constraints/Cidr.php Outdated Show resolved Hide resolved
@OskarStark
Copy link
Contributor

@nicolas-grekas rebased, cs fixed, squashed ✅

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

LGTM with a few minor comments

src/Symfony/Component/Validator/Constraints/Cidr.php Outdated Show resolved Hide resolved
src/Symfony/Component/Validator/Constraints/Cidr.php Outdated Show resolved Hide resolved
src/Symfony/Component/Validator/Constraints/Cidr.php Outdated Show resolved Hide resolved
@Ninos
Copy link
Contributor Author

Ninos commented Jan 8, 2024

rebased & resolved latest comments, thank you!

@Ninos Ninos changed the title [Validator] Add additional versions (*_NO_PUBLIC, *_ONLY_PRIV & *_ONLY_RES) in IP address constraint [Validator] Add additional versions (*_NO_PUBLIC, *_ONLY_PRIV & *_ONLY_RES) in IP address & CIDR constraint Jan 9, 2024
…*_ONLY_RES`) in IP address & CIDR constraint
@fabpot
Copy link
Member

fabpot commented Feb 3, 2024

Thank you @Ninos.

@fabpot fabpot merged commit a770fae into symfony:7.1 Feb 3, 2024
1 of 3 checks passed
nicolas-grekas added a commit that referenced this pull request Feb 7, 2024
This PR was merged into the 7.1 branch.

Discussion
----------

[Validator] revert accepting any scalar value

| Q             | A
| ------------- | ---
| Branch?       | 7.1
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

This change sneaked into the codebase in #52658.

Commits
-------

8d27007 revert accepting any scalar value
@fabpot fabpot mentioned this pull request May 2, 2024
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.

None yet

7 participants