8000 [Validator] Add additional versions (`*_NO_PUBLIC`, `*_ONLY_PRIV` & `*_ONLY_RES`) in IP address constraint by Ninos · Pull Request #51777 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

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

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

Closed
wants to merge 32 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9cf46fc
Update src/Symfony/Component/Validator/Constraints/Mac.php
Ninos Oct 5, 2023
9775156
CS
Ninos Oct 5, 2023
646fd5f
Removed: Mac constraint
Ninos Oct 6, 2023
26e9f2a
[Validator] Remove `Mac` constraint
Ninos Oct 6, 2023
6e84494
[Validator] Fix IpTest
Ninos Oct 6, 2023
cfff49a
[Validator] Renamed constants to full-word names
Ninos Nov 5, 2023
3f58f6b
[Validator] Renamed constants to full-word names
Ninos Nov 5, 2023
a0419db
[Validator] Possibility to use all `Ip` constraint versions in `Cidr`…
Ninos Nov 6, 2023
ed09494
[Validator] Possibility to use all `Ip` constraint versions in `Cidr`…
Ninos Nov 6, 2023
65b3184
[Validator] Possibility to use all `Ip` constraint versions in `Cidr`…
Ninos Nov 6, 2023
b066087
[Validator] Possibility to use all `Ip` constraint versions in `Cidr`…
Ninos Nov 6, 2023
1991107
[Validator] Fixed tests & added `*_NO_PUBLIC`
Ninos Nov 6, 2023
cbdd81f
[Validator] Fixed tests
Ninos Nov 6, 2023
601809c
[Validator] Added normalizer to `Cidr` + better string support
Ninos Nov 7, 2023
cc930ef
Merge branch '7.1' into constraints-networking
Ninos Nov 20, 2023
0d12319
[Validator] Small fixes
Ninos Nov 20, 2023
b58bb03
[Validator] Small fixes
Ninos Nov 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Enhancement: OnlyPrivate & OnlyReserved tests
  • Loading branch information
Ninos committed Sep 28, 2023
commit c11c261a96c7d47e816647708a444764624778b3
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,15 @@ public function testInvalidIpsV4($ip)
->assertRaised();
}

public static function getValidPublicIpsV4()
{
return [
['8.0.0.0'],
['90.0.0.0'],
['110.0.0.110'],
];
}

public static function getInvalidIpsV4()
{
return [
Expand Down Expand Up @@ -231,7 +240,7 @@ public function testInvalidPrivateIpsV4($ip)
}

/**
* @dataProvider getValidReservedIpsV4
* @dataProvider getInvalidPrivateIpsV4
*/
public function testInvalidOnlyPrivateIpsV4($ip)
{
Expand All @@ -257,6 +266,11 @@ public static function getValidPrivateIpsV4()
];
}

public static function getInvalidPrivateIpsV4()
{
return array_merge(self::getValidPublicIpsV4(), self::getValidReservedIpsV4());
}

/**
* @dataProvider getValidReservedIpsV4
*/
Expand Down Expand Up @@ -288,7 +302,7 @@ public function testInvalidReservedIpsV4($ip)
}

/**
* @dataProvider getValidPrivateIpsV4
* @dataProvider getInvalidReservedIpsV4
*/
public function testInvalidOnlyReservedIpsV4($ip)
{
Expand All @@ -314,6 +328,11 @@ public static function getValidReservedIpsV4()
];
}

public static function getInvalidReservedIpsV4()
{
return array_merge(self::getValidPublicIpsV4(), self::getValidPrivateIpsV4());
}

/**
* @dataProvider getInvalidPublicIpsV4
*/
Expand Down
0