Skip to content

Commit ad13a58

Browse files
Merge branch '4.2' into 4.3
* 4.2: [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion ignore not existing translator service [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion revert private properties handling [HttpFoundation] Fix URLs [VarDumper] finish PHP 7.4 support and add tests [VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4) Ignore missing translation dependency in FrameworkBundle Remove dead tests fixtures Remove more dead tests fixtures Remove dead tests fixtures [Debug][ExceptionHandler] Add tests for custom handlers
2 parents 86b0943 + ce73ff4 commit ad13a58

24 files changed

+24
-75
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
12271227

12281228
if (interface_exists(TranslatorInterface::class) && class_exists(LegacyTranslatorProxy::class)) {
12291229
$calls = $validatorBuilder->getMethodCalls();
1230-
$calls[1] = ['setTranslator', [new Definition(LegacyTranslatorProxy::class, [new Reference('translator')])]];
1230+
$calls[1] = ['setTranslator', [new Definition(LegacyTranslatorProxy::class, [new Reference('translator', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])]];
12311231
$validatorBuilder->setMethodCalls($calls);
12321232
}
12331233

Resources/config/validator.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<argument type="service" id="validator.validator_factory" />
2424
</call>
2525
<call method="setTranslator">
26-
<argument type="service" id="translator" />
26+
<argument type="service" id="translator" on-invalid="ignore" />
2727
</call>
2828
<call method="setTranslationDomain">
2929
<argument>%validator.translation_domain%</argument>

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,9 +906,9 @@ public function testValidation()
906906
$this->assertEquals([new Reference('validator.validator_factory')], $calls[0][1]);
907907
$this->assertSame('setTranslator', $calls[1][0]);
908908
if (interface_exists(TranslatorInterface::class) && class_exists(LegacyTranslatorProxy::class)) {
909-
$this->assertEquals([new Definition(LegacyTranslatorProxy::class, [new Reference('translator')])], $calls[1][1]);
909+
$this->assertEquals([new Definition(LegacyTranslatorProxy::class, [new Reference('translator', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])], $calls[1][1]);
910910
} else {
911-
$this->assertEquals([new Reference('translator')], $calls[1][1]);
911+
$this->assertEquals([new Reference('translator', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)], $calls[1][1]);
912912
}
913913
$this->assertSame('setTranslationDomain', $calls[2][0]);
914914
$this->assertSame(['%validator.translation_domain%'], $calls[2][1]);

Tests/Fixtures/TestBundle/Fabpot/FooBundle/Controller/DefaultController.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

Tests/Fixtures/TestBundle/Fabpot/FooBundle/FabpotFooBundle.php

Lines changed: 0 additions & 30 deletions
This file was deleted.

Tests/Functional/WebTestCase.php renamed to Tests/Functional/AbstractWebTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
1515
use Symfony\Component\Filesystem\Filesystem;
1616

17-
class WebTestCase extends BaseWebTestCase
17+
abstract class AbstractWebTestCase extends BaseWebTestCase
1818
{
1919
public static function assertRedirect($response, $location)
2020
{

Tests/Functional/AnnotatedControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
1313

14-
class AnnotatedControllerTest extends WebTestCase
14+
class AnnotatedControllerTest extends AbstractWebTestCase
1515
{
1616
/**
1717
* @dataProvider getRoutes

Tests/Functional/AutowiringTypesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher;
2020
use Symfony\Component\Templating\EngineInterface as ComponentEngineInterface;
2121

22-
class AutowiringTypesTest extends WebTestCase
22+
class AutowiringTypesTest extends AbstractWebTestCase
2323
{
2424
public function testAnnotationReaderAutowiring()
2525
{

Tests/Functional/CachePoolClearCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* @group functional
2020
*/
21-
class CachePoolClearCommandTest extends WebTestCase
21+
class CachePoolClearCommandTest extends AbstractWebTestCase
2222
{
2323
protected function setUp()
2424
{

Tests/Functional/CachePoolsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
1717
use Symfony\Component\Cache\Exception\InvalidArgumentException;
1818

19-
class CachePoolsTest extends WebTestCase
19+
class CachePoolsTest extends AbstractWebTestCase
2020
{
2121
public function testCachePools()
2222
{

0 commit comments

Comments
 (0)