Skip to content

Commit 23710ca

Browse files
Merge branch '4.3' into 4.4
* 4.3: [Form][Validator][Intl] Fix tests [Messenger] return empty envelopes when RetryableException occurs [Validator] Accept underscores in the URL validator as the URL will resolve correctly [Translation] Collect original locale in case of fallback translation Fix toolbar load when GET params are present in "_wdt" route
2 parents c06370b + 720b228 commit 23710ca

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Constraints/UrlValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class UrlValidator extends ConstraintValidator
2626
(%s):// # protocol
2727
(([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth
2828
(
29-
([\pL\pN\pS\-\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
29+
([\pL\pN\pS\-\_\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
3030
| # or
3131
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address
3232
| # or

Tests/Constraints/LanguageValidatorTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ public function getValidLanguages()
7373
{
7474
return [
7575
['en'],
76-
['en_US'],
7776
['my'],
7877
];
7978
}

Tests/Constraints/UrlValidatorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ public function getValidUrls()
106106
['http://www.example.museum'],
107107
['https://example.com/'],
108108
['https://example.com:80/'],
109+
['http://examp_le.com'],
110+
['http://www.sub_domain.examp_le.com'],
109111
['http://www.example.coop/'],
110112
['http://www.test-example.com/'],
111113
['http://www.symfony.com/'],
@@ -239,7 +241,6 @@ public function getInvalidUrls()
239241
['://example.com'],
240242
['http ://example.com'],
241243
['http:/example.com'],
242-
['http://examp_le.com'],
243244
['http://example.com::aa'],
244245
['http://example.com:aa'],
245246
['ftp://example.fr'],

0 commit comments

Comments
 (0)