Skip to content

Commit 046608d

Browse files
Merge branch '4.3' into 4.4
* 4.3: [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 [Security/Http] Don't mark AbstractAuthenticationListener as internal Remove dead tests fixtures Remove more dead tests fixtures [Mime] Add missing changelog entry for BC-break [Messenger] fix transport_name option not passing validation Remove dead tests fixtures [Debug][ExceptionHandler] Add tests for custom handlers
2 parents 19d7440 + ad13a58 commit 046608d

24 files changed

+24
-75
lines changed

DependencyInjection/FrameworkExtension.php

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

12441244
if (interface_exists(TranslatorInterface::class) && class_exists(LegacyTranslatorProxy::class)) {
12451245
$calls = $validatorBuilder->getMethodCalls();
1246-
$calls[1] = ['setTranslator', [new Definition(LegacyTranslatorProxy::class, [new Reference('translator')])]];
1246+
$calls[1] = ['setTranslator', [new Definition(LegacyTranslatorProxy::class, [new Reference('translator', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])]];
12471247
$validatorBuilder->setMethodCalls($calls);
12481248
}
12491249

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
@@ -913,9 +913,9 @@ public function testValidation()
913913
$this->assertEquals([new Reference('validator.validator_factory')], $calls[0][1]);
914914
$this->assertSame('setTranslator', $calls[1][0]);
915915
if (interface_exists(TranslatorInterface::class) && class_exists(LegacyTranslatorProxy::class)) {
916-
$this->assertEquals([new Definition(LegacyTranslatorProxy::class, [new Reference('translator')])], $calls[1][1]);
916+
$this->assertEquals([new Definition(LegacyTranslatorProxy::class, [new Reference('translator', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])], $calls[1][1]);
917917
} else {
918-
$this->assertEquals([new Reference('translator')], $calls[1][1]);
918+
$this->assertEquals([new Reference('translator', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)], $calls[1][1]);
919919
}
920920
$this->assertSame('setTranslationDomain', $calls[2][0]);
921921
$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)