Commit e5d6c57
committed
minor symfony#61094 [Routing] Add test to validate that default value is allowed to not match requirement (tcoch)
This PR was squashed before being merged into the 6.4 branch.
Discussion
----------
[Routing] Add test to validate that default value is allowed to not match requirement
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Issues | symfony#61022
| License | MIT
Suppose you have this route definition:
```php
$route = new Route('/test/{foo}', ['foo' => 'foo-'], ['foo' => '\w+'], []);
```
With this route definition:
- `/test/foo` works
- `/test/foo-` fails, because the dash is not permitted by the requirement
- `/test` works, thanks to the default value. However, the value of the parameter `foo` does not meet the requirement.
Commits
-------
f6e91fd [Routing] Add test to validate that default value is allowed to not match requirementFile tree
1 file changed
+24
-0
lines changed- src/Symfony/Component/Routing/Tests/Matcher
1 file changed
+24
-0
lines changedLines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
982 | 982 | | |
983 | 983 | | |
984 | 984 | | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
985 | 1009 | | |
986 | 1010 | | |
987 | 1011 | | |
| |||
0 commit comments