Skip to content

Commit 8c5a1cb

Browse files
Merge branch '4.4'
* 4.4: [Form][Validator][Intl] Fix tests [Messenger] return empty envelopes when RetryableException occurs [Intl] Excludes locale from language codes (split localized language names) [FrameworkBundle] WebTestCase KernelBrowser::getContainer null return type [Intl] Fix compile type errors [Validator] Accept underscores in the URL validator as the URL will resolve correctly [Translation] Collect original locale in case of fallback translation Add types to constructors and private/final/internal methods (Batch I) [HttpFoundation] optimize normalization of headers Replace REMOTE_ADDR in trusted proxies with the current REMOTE_ADDR [ErrorHandler] Forward \Throwable Fix toolbar load when GET params are present in "_wdt" route
2 parents 757a004 + 23710ca commit 8c5a1cb

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
@@ -25,7 +25,7 @@ class UrlValidator extends ConstraintValidator
2525
(%s):// # protocol
2626
(([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth
2727
(
28-
([\pL\pN\pS\-\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
28+
([\pL\pN\pS\-\_\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
2929
| # or
3030
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address
3131
| # 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
@@ -102,6 +102,8 @@ public function getValidUrls()
102102
['http://www.example.museum'],
103103
['https://example.com/'],
104104
['https://example.com:80/'],
105+
['http://examp_le.com'],
106+
['http://www.sub_domain.examp_le.com'],
105107
['http://www.example.coop/'],
106108
['http://www.test-example.com/'],
107109
['http://www.symfony.com/'],
@@ -235,7 +237,6 @@ public function getInvalidUrls()
235237
['://example.com'],
236238
['http ://example.com'],
237239
['http:/example.com'],
238-
['http://examp_le.com'],
239240
['http://example.com::aa'],
240241
['http://example.com:aa'],
241242
['ftp://example.fr'],

0 commit comments

Comments
 (0)