Skip to content

Commit 0d90dc3

Browse files
Merge branch '4.1' into 4.2
* 4.1: [HttpFoundation] Check file exists before unlink [Console] Fixed #29835: ConfirmationQuestion with default true for answer '0' [Translation] Concatenated translation messages [Form] ensure compatibility with older PHPUnit mocks [Serializer] Docblock about throwing exceptions on serializer [Debug][ErrorHandler] Preserve our error handler when a logger set another one [Form] Changed UrlType input type to text when default_protocol is not null [Bugfix] MemcachedSessionHandler::close() must close connection
2 parents 219758e + b9a1edd commit 0d90dc3

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

Tests/Extension/AbstractBootstrap3LayoutTest.php

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2422,13 +2422,29 @@ public function testTimezoneWithPlaceholder()
24222422
);
24232423
}
24242424

2425-
public function testUrl()
2425+
public function testUrlWithDefaultProtocol()
24262426
{
24272427
$url = 'http://www.google.com?foo1=bar1&foo2=bar2';
2428-
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url);
2428+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url, ['default_protocol' => 'http']);
24292429

24302430
$this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']],
24312431
'/input
2432+
[@type="text"]
2433+
[@name="name"]
2434+
[@class="my&class form-control"]
2435+
[@value="http://www.google.com?foo1=bar1&foo2=bar2"]
2436+
[@inputmode="url"]
2437+
'
2438+
);
2439+
}
2440+
2441+
public function testUrlWithoutDefaultProtocol()
2442+
{
2443+
$url = 'http://www.google.com?foo1=bar1&foo2=bar2';
2444+
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url, ['default_protocol' => null]);
2445+
2446+
$this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']],
2447+
'/input
24322448
[@type="url"]
24332449
[@name="name"]
24342450
[@class="my&class form-control"]

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"symfony/asset": "~3.4|~4.0",
2525
"symfony/dependency-injection": "~3.4|~4.0",
2626
"symfony/finder": "~3.4|~4.0",
27-
"symfony/form": "^4.2",
27+
"symfony/form": "^4.2.3",
2828
"symfony/http-foundation": "~3.4|~4.0",
2929
"symfony/http-kernel": "~3.4|~4.0",
3030
"symfony/polyfill-intl-icu": "~1.0",

0 commit comments

Comments
 (0)