Skip to content

Commit ee35d41

Browse files
committed
Merge branch '3.4' into 4.0
* 3.4: [Security] Adding a GuardAuthenticatorHandler alias fixed tests moved method to function marked method as being internal Disallow viewing dot-files in Profiler
2 parents 7cd8b53 + 606dcef commit ee35d41

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Extension/FormExtension.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,10 @@ public function getTests()
7373
{
7474
return array(
7575
new TwigTest('selectedchoice', 'Symfony\Bridge\Twig\Extension\twig_is_selected_choice'),
76-
new TwigTest('rootform', array($this, 'isRootForm')),
76+
new TwigTest('rootform', 'Symfony\Bridge\Twig\Extension\twig_is_root_form'),
7777
);
7878
}
7979

80-
public function isRootForm(FormView $formView)
81-
{
82-
return null === $formView->parent;
83-
}
84-
8580
/**
8681
* {@inheritdoc}
8782
*/
@@ -110,3 +105,11 @@ function twig_is_selected_choice(ChoiceView $choice, $selectedValue)
110105

111106
return $choice->value === $selectedValue;
112107
}
108+
109+
/**
110+
* @internal
111+
*/
112+
function twig_is_root_form(FormView $formView)
113+
{
114+
return null === $formView->parent;
115+
}

Tests/Extension/FormExtensionDivLayoutTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ public function isRootFormProvider()
162162
*/
163163
public function testIsRootForm($expected, FormView $formView)
164164
{
165-
$extension = new FormExtension();
166-
$this->assertSame($expected, $extension->isRootForm($formView));
165+
$this->assertSame($expected, twig_is_root_form($formView));
167166
}
168167

169168
protected function renderForm(FormView $view, array $vars = array())

0 commit comments

Comments
 (0)