Skip to content

Commit 38da9b8

Browse files
committed
Merge branch '2.3' into 2.6
* 2.3: CS: fixes Translator component has default domain for null implemented no need to have default translation domain logic in 3 different places [travis] Kill tests when a new commit has been pushed fixed CS Change behavior to mirror hash_equals() returning early if there is a length mismatch CS fixing Prevent modifying secrets as much as possible Update StringUtils.php Whitespace Update StringUtils.php CS: general fixes [SecurityBundle] removed a duplicated service definition and simplified others. Conflicts: src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml src/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services11.php
2 parents 49a33aa + dfc5e71 commit 38da9b8

File tree

4 files changed

+21
-16
lines changed

4 files changed

+21
-16
lines changed

Extension/Core/Type/BaseType.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
5757
$uniqueBlockPrefix = '_'.$blockName;
5858
}
5959

60-
if (!$translationDomain) {
60+
if (null === $translationDomain) {
6161
$translationDomain = $view->parent->vars['translation_domain'];
6262
}
6363

@@ -81,10 +81,6 @@ public function buildView(FormView $view, FormInterface $form, array $options)
8181
}
8282
$blockPrefixes[] = $uniqueBlockPrefix;
8383

84-
if (!$translationDomain) {
85-
$translationDomain = 'messages';
86-
}
87-
8884
$view->vars = array_replace($view->vars, array(
8985
'form' => $view,
9086
'id' => $id,

Tests/AbstractFormTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22

3-
/*
4-
* This file is part of the Symfony package.
5-
*
6-
* (c) Fabien Potencier <[email protected]>
7-
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
10-
*/
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
1111

1212
namespace Symfony\Component\Form\Tests;
1313

Tests/CallbackTransformerTest.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Component\Form\Tests;
413

514
use Symfony\Component\Form\CallbackTransformer;
@@ -30,8 +39,8 @@ public function testConstructorWithInvalidCallbacks($transformCallback, $reverse
3039
public function invalidCallbacksProvider()
3140
{
3241
return array(
33-
array( null, function () {} ),
34-
array( function () {}, null ),
42+
array(null, function () {}),
43+
array(function () {}, null),
3544
);
3645
}
3746
}

Tests/Extension/Core/Type/BaseTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function testDefaultTranslationDomain()
112112
->getForm()
113113
->createView();
114114

115-
$this->assertEquals('messages', $view['child']->vars['translation_domain']);
115+
$this->assertNull($view['child']->vars['translation_domain']);
116116
}
117117

118118
public function testPassLabelToView()

0 commit comments

Comments
 (0)