Skip to content

Commit b856ab5

Browse files
Merge branch '3.4' into 4.2
* 3.4: [WebProfilerBundle] fix FC with HttpFoundation v5 [Form] test case is not legacy Fix reporting unsilenced deprecations from insulated tests Added FormInterface to @return Form::getClickedButton docblock
2 parents 9025ded + 776ab62 commit b856ab5

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ public function endTest($test, $time)
284284
foreach ($deprecations ? unserialize($deprecations) : array() as $deprecation) {
285285
$error = serialize(array('deprecation' => $deprecation[1], 'class' => $className, 'method' => $test->getName(false), 'triggering_file' => isset($deprecation[2]) ? $deprecation[2] : null));
286286
if ($deprecation[0]) {
287-
@trigger_error($error, E_USER_DEPRECATED);
287+
// unsilenced on purpose
288+
trigger_error($error, E_USER_DEPRECATED);
288289
} else {
289290
@trigger_error($error, E_USER_DEPRECATED);
290291
}

src/Symfony/Component/BrowserKit/Client.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,8 @@ protected function doRequestInProcess($request)
457457
unlink($deprecationsFile);
458458
foreach ($deprecations ? unserialize($deprecations) : [] as $deprecation) {
459459
if ($deprecation[0]) {
460-
@trigger_error($deprecation[1], E_USER_DEPRECATED);
460+
// unsilenced on purpose
461+
trigger_error($deprecation[1], E_USER_DEPRECATED);
461462
} else {
462463
@trigger_error($deprecation[1], E_USER_DEPRECATED);
463464
}

src/Symfony/Component/Form/Form.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterfac
8989
private $submitted = false;
9090

9191
/**
92-
* @var ClickableInterface|null The button that was used to submit the form
92+
* @var FormInterface|ClickableInterface|null The button that was used to submit the form
9393
*/
9494
private $clickedButton;
9595

@@ -747,7 +747,7 @@ public function isValid()
747747
/**
748748
* Returns the button that was used to submit the form.
749749
*
750-
* @return ClickableInterface|null
750+
* @return FormInterface|ClickableInterface|null
751751
*/
752752
public function getClickedButton()
753753
{

src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,10 +725,7 @@ public function testSubmitMultipleChoiceExpandedWithEmptyDataAndInitialData()
725725
$this->assertSame(['test'], $form->getData());
726726
}
727727

728-
/**
729-
* @group legacy
730-
*/
731-
public function testLegacyNullChoices()
728+
public function testNullChoices()
732729
{
733730
$form = $this->factory->create(static::TESTED_TYPE, null, [
734731
'multiple' => false,

0 commit comments

Comments
 (0)