From c53e25332adbb05671e4c3de4fe17f24409671d3 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Fri, 19 Jul 2019 10:43:44 +0200 Subject: [PATCH 01/15] [Debug][ExceptionHandler] Add tests for custom handlers --- .../Debug/Tests/ExceptionHandlerTest.php | 68 +++++++++++++------ 1 file changed, 49 insertions(+), 19 deletions(-) diff --git a/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php b/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php index e166136cbb..8a19664950 100644 --- a/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php @@ -76,7 +76,7 @@ class ExceptionHandlerTest extends TestCase ob_start(); $handler->sendPhpResponse(new MethodNotAllowedHttpException(['POST'])); - $response = ob_get_clean(); + ob_get_clean(); $expectedHeaders = [ ['HTTP/1.0 405', true, null], @@ -99,35 +99,65 @@ class ExceptionHandlerTest extends TestCase public function testHandle() { - $exception = new \Exception('foo'); + $handler = new ExceptionHandler(true); + ob_start(); - $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(['sendPhpResponse'])->getMock(); - $handler - ->expects($this->exactly(2)) - ->method('sendPhpResponse'); + $handler->handle(new \Exception('foo')); - $handler->handle($exception); + $this->assertThatTheExceptionWasOutput(ob_get_clean(), \Exception::class, 'Exception', 'foo'); + } - $handler->setHandler(function ($e) use ($exception) { - $this->assertSame($exception, $e); + public function testHandleWithACustomHandlerThatOutputsSomething() + { + $handler = new ExceptionHandler(true); + ob_start(); + $handler->setHandler(function () { + echo 'ccc'; }); - $handler->handle($exception); + $handler->handle(new \Exception()); + ob_end_flush(); // Necessary because of this PHP bug : https://bugs.php.net/bug.php?id=76563 + $this->assertSame('ccc', ob_get_clean()); + } + + public function testHandleWithACustomHandlerThatOutputsNothing() + { + $handler = new ExceptionHandler(true); + $handler->setHandler(function () {}); + + $handler->handle(new \Exception('ccc')); + + $this->assertThatTheExceptionWasOutput(ob_get_clean(), \Exception::class, 'Exception', 'ccc'); + } + + public function testHandleWithACustomHandlerThatFails() + { + $handler = new ExceptionHandler(true); + $handler->setHandler(function () { + throw new \RuntimeException(); + }); + + $handler->handle(new \Exception('ccc')); + + $this->assertThatTheExceptionWasOutput(ob_get_clean(), \Exception::class, 'Exception', 'ccc'); } public function testHandleOutOfMemoryException() { - $exception = new OutOfMemoryException('foo', 0, E_ERROR, __FILE__, __LINE__); - - $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(['sendPhpResponse'])->getMock(); - $handler - ->expects($this->once()) - ->method('sendPhpResponse'); - - $handler->setHandler(function ($e) { + $handler = new ExceptionHandler(true); + ob_start(); + $handler->setHandler(function () { $this->fail('OutOfMemoryException should bypass the handler'); }); - $handler->handle($exception); + $handler->handle(new OutOfMemoryException('foo', 0, E_ERROR, __FILE__, __LINE__)); + + $this->assertThatTheExceptionWasOutput(ob_get_clean(), OutOfMemoryException::class, 'OutOfMemoryException', 'foo'); + } + + private function assertThatTheExceptionWasOutput($content, $expectedClass, $expectedTitle, $expectedMessage) + { + $this->assertContains(sprintf('%s', $expectedClass, $expectedTitle), $content); + $this->assertContains(sprintf('

%s

', $expectedMessage), $content); } } From f7e24c2c80b35a1264a31f0388dd1e593cc7a1d6 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Fri, 19 Jul 2019 13:42:31 +0200 Subject: [PATCH 02/15] Remove dead tests fixtures --- .../Compiler/AddConsoleCommandPassTest.php | 5 --- .../Tests/SecurityUserValueResolverTest.php | 8 ---- .../Debug/Tests/MockExceptionHandler.php | 24 ------------ .../OtherDir/Component1/Dir3/Service3.php | 8 ---- .../Prototype/Sub/NoLoadAbstractBar.php | 7 ---- .../Prototype/Sub/NoLoadBarInterface.php | 7 ---- .../Fixtures/Prototype/Sub/NoLoadBarTrait.php | 7 ---- .../Fixtures/includes/autowiring_classes.php | 14 ------- .../HttpFoundation/Tests/ResponseTest.php | 11 ------ .../ExtensionLoadedExtension.php | 22 ----------- .../ExtensionLoadedBundle.php | 18 --------- .../Command/BarCommand.php | 17 --------- .../Normalizer/GetSetMethodNormalizerTest.php | 37 ------------------- .../Normalizer/PropertyNormalizerTest.php | 12 ------ .../Tests/Fixtures/ConstraintAValidator.php | 37 ------------------- .../Tests/Fixtures/FakeClassMetadata.php | 26 ------------- .../Fixtures/InvalidConstraintValidator.php | 16 -------- 17 files changed, 276 deletions(-) delete mode 100644 src/Symfony/Component/Debug/Tests/MockExceptionHandler.php delete mode 100644 src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/OtherDir/Component1/Dir3/Service3.php delete mode 100644 src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/Sub/NoLoadAbstractBar.php delete mode 100644 src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/Sub/NoLoadBarInterface.php delete mode 100644 src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/Sub/NoLoadBarTrait.php delete mode 100644 src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/ExtensionLoadedExtension.php delete mode 100644 src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/ExtensionLoadedBundle.php delete mode 100644 src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php delete mode 100644 src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php delete mode 100644 src/Symfony/Component/Validator/Tests/Fixtures/FakeClassMetadata.php delete mode 100644 src/Symfony/Component/Validator/Tests/Fixtures/InvalidConstraintValidator.php diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php index 17cbf62d0b..3681ca2047 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php @@ -16,7 +16,6 @@ use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleComman use Symfony\Component\Console\Command\Command; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\HttpKernel\Bundle\Bundle; /** * @group legacy @@ -123,7 +122,3 @@ class AddConsoleCommandPassTest extends TestCase class MyCommand extends Command { } - -class ExtensionPresentBundle extends Bundle -{ -} diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/SecurityUserValueResolverTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/SecurityUserValueResolverTest.php index 90f31f0b31..539f585b26 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/SecurityUserValueResolverTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/SecurityUserValueResolverTest.php @@ -91,11 +91,3 @@ class SecurityUserValueResolverTest extends TestCase $this->assertSame([null], $argumentResolver->getArguments(Request::create('/'), function (UserInterface $user = null) {})); } } - -abstract class DummyUser implements UserInterface -{ -} - -abstract class DummySubUser extends DummyUser -{ -} diff --git a/src/Symfony/Component/Debug/Tests/MockExceptionHandler.php b/src/Symfony/Component/Debug/Tests/MockExceptionHandler.php deleted file mode 100644 index 2d6ce564d2..0000000000 --- a/src/Symfony/Component/Debug/Tests/MockExceptionHandler.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Debug\Tests; - -use Symfony\Component\Debug\ExceptionHandler; - -class MockExceptionHandler extends ExceptionHandler -{ - public $e; - - public function handle(\Exception $e) - { - $this->e = $e; - } -} diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/OtherDir/Component1/Dir3/Service3.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/OtherDir/Component1/Dir3/Service3.php deleted file mode 100644 index ee6498c9d5..0000000000 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/OtherDir/Component1/Dir3/Service3.php +++ /dev/null @@ -1,8 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionLoadedBundle\DependencyInjection; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\Extension; - -class ExtensionLoadedExtension extends Extension -{ - public function load(array $configs, ContainerBuilder $container) - { - } -} diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/ExtensionLoadedBundle.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/ExtensionLoadedBundle.php deleted file mode 100644 index 3af81cb073..0000000000 --- a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/ExtensionLoadedBundle.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionLoadedBundle; - -use Symfony\Component\HttpKernel\Bundle\Bundle; - -class ExtensionLoadedBundle extends Bundle -{ -} diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php deleted file mode 100644 index 977976b75f..0000000000 --- a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php +++ /dev/null @@ -1,17 +0,0 @@ -kevinDunglas = $kevinDunglas; - } - - public function getKevinDunglas() - { - return $this->kevinDunglas; - } - - public function setFooBar($fooBar) - { - $this->fooBar = $fooBar; - } - - public function getFooBar() - { - return $this->fooBar; - } - - public function setBar_foo($bar_foo) - { - $this->bar_foo = $bar_foo; - } - - public function getBar_foo() - { - return $this->bar_foo; - } -} - class ObjectConstructorArgsWithPrivateMutatorDummy { private $foo; diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php index f8d1eb8db8..cfa21b6758 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php @@ -497,18 +497,6 @@ class PropertyConstructorDummy } } -class PropertyCamelizedDummy -{ - private $kevinDunglas; - public $fooBar; - public $bar_foo; - - public function __construct($kevinDunglas = null) - { - $this->kevinDunglas = $kevinDunglas; - } -} - class StaticPropertyDummy { private static $property = 'value'; diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php deleted file mode 100644 index 8b0d30f571..0000000000 --- a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintAValidator.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Tests\Fixtures; - -use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Context\ExecutionContextInterface; - -class ConstraintAValidator extends ConstraintValidator -{ - public static $passedContext; - - public function initialize(ExecutionContextInterface $context) - { - parent::initialize($context); - - self::$passedContext = $context; - } - - public function validate($value, Constraint $constraint) - { - if ('VALID' != $value) { - $this->context->addViolation('message', ['param' => 'value']); - - return; - } - } -} diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/FakeClassMetadata.php b/src/Symfony/Component/Validator/Tests/Fixtures/FakeClassMetadata.php deleted file mode 100644 index 39f5477779..0000000000 --- a/src/Symfony/Component/Validator/Tests/Fixtures/FakeClassMetadata.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Tests\Fixtures; - -use Symfony\Component\Validator\Mapping\ClassMetadata; - -class FakeClassMetadata extends ClassMetadata -{ - public function addCustomPropertyMetadata($propertyName, $metadata) - { - if (!isset($this->members[$propertyName])) { - $this->members[$propertyName] = []; - } - - $this->members[$propertyName][] = $metadata; - } -} diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/InvalidConstraintValidator.php b/src/Symfony/Component/Validator/Tests/Fixtures/InvalidConstraintValidator.php deleted file mode 100644 index bd9a5cf6c3..0000000000 --- a/src/Symfony/Component/Validator/Tests/Fixtures/InvalidConstraintValidator.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Tests\Fixtures; - -class InvalidConstraintValidator -{ -} From 48408e3c5b482eac2b7ad109362c830b843b45d6 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Fri, 19 Jul 2019 14:27:46 +0200 Subject: [PATCH 03/15] [Messenger] fix transport_name option not passing validation the doctrine transport connection validates the options and complains about this option, so we remove it before. the purpose is for custom transport factories anyway --- .../Messenger/Transport/AmqpExt/AmqpTransportFactory.php | 2 ++ .../Messenger/Transport/Doctrine/DoctrineTransportFactory.php | 1 + .../Messenger/Transport/RedisExt/RedisTransportFactory.php | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/Symfony/Component/Messenger/Transport/AmqpExt/AmqpTransportFactory.php b/src/Symfony/Component/Messenger/Transport/AmqpExt/AmqpTransportFactory.php index 35cb4eb1c4..8f209a9db4 100644 --- a/src/Symfony/Component/Messenger/Transport/AmqpExt/AmqpTransportFactory.php +++ b/src/Symfony/Component/Messenger/Transport/AmqpExt/AmqpTransportFactory.php @@ -24,6 +24,8 @@ class AmqpTransportFactory implements TransportFactoryInterface { public function createTransport(string $dsn, array $options, SerializerInterface $serializer): TransportInterface { + unset($options['transport_name']); + return new AmqpTransport(Connection::fromDsn($dsn, $options), $serializer); } diff --git a/src/Symfony/Component/Messenger/Transport/Doctrine/DoctrineTransportFactory.php b/src/Symfony/Component/Messenger/Transport/Doctrine/DoctrineTransportFactory.php index 3f9aa7981a..959a4ec7a2 100644 --- a/src/Symfony/Component/Messenger/Transport/Doctrine/DoctrineTransportFactory.php +++ b/src/Symfony/Component/Messenger/Transport/Doctrine/DoctrineTransportFactory.php @@ -33,6 +33,7 @@ class DoctrineTransportFactory implements TransportFactoryInterface public function createTransport(string $dsn, array $options, SerializerInterface $serializer): TransportInterface { + unset($options['transport_name']); $configuration = Connection::buildConfiguration($dsn, $options); try { diff --git a/src/Symfony/Component/Messenger/Transport/RedisExt/RedisTransportFactory.php b/src/Symfony/Component/Messenger/Transport/RedisExt/RedisTransportFactory.php index acb2d1f591..45e4b8b144 100644 --- a/src/Symfony/Component/Messenger/Transport/RedisExt/RedisTransportFactory.php +++ b/src/Symfony/Component/Messenger/Transport/RedisExt/RedisTransportFactory.php @@ -25,6 +25,8 @@ class RedisTransportFactory implements TransportFactoryInterface { public function createTransport(string $dsn, array $options, SerializerInterface $serializer): TransportInterface { + unset($options['transport_name']); + return new RedisTransport(Connection::fromDsn($dsn, $options), $serializer); } From 3a354321c8fbc60bdb0c09bfe423b22fadbb137c Mon Sep 17 00:00:00 2001 From: Konstantin Myakshin Date: Fri, 19 Jul 2019 01:33:46 +0300 Subject: [PATCH 04/15] [Mime] Add missing changelog entry for BC-break --- src/Symfony/Component/Mime/CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/Symfony/Component/Mime/CHANGELOG.md diff --git a/src/Symfony/Component/Mime/CHANGELOG.md b/src/Symfony/Component/Mime/CHANGELOG.md new file mode 100644 index 0000000000..796cfdd155 --- /dev/null +++ b/src/Symfony/Component/Mime/CHANGELOG.md @@ -0,0 +1,12 @@ +CHANGELOG +========= + +4.3.3 +----- + + * [BC BREAK] Renamed method `Headers::getAll()` to `Headers::all()`. + +4.3.0 +----- + + * Introduced the component as experimental From a1fb54d900ad6ae743c4d878aefc7f1e8b4f83ab Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Fri, 19 Jul 2019 18:29:19 +0200 Subject: [PATCH 05/15] Remove more dead tests fixtures --- .../Compiler/FormPassTest.php | 9 -------- .../DependencyInjection/FormPassTest.php | 9 -------- .../Tests/PropertyAccessorCollectionTest.php | 22 ------------------- 3 files changed, 40 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.php index 95423c2601..b5e3c9f241 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.php @@ -16,7 +16,6 @@ use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FormPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Form\AbstractType; /** * @group legacy @@ -214,11 +213,3 @@ class FormPassTest extends TestCase ]; } } - -class FormPassTest_Type1 extends AbstractType -{ -} - -class FormPassTest_Type2 extends AbstractType -{ -} diff --git a/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php b/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php index a23607412c..1e756ac5cf 100644 --- a/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php +++ b/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php @@ -18,7 +18,6 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ServiceLocator; -use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Command\DebugCommand; use Symfony\Component\Form\DependencyInjection\FormPass; use Symfony\Component\Form\FormRegistry; @@ -272,11 +271,3 @@ class FormPassTest extends TestCase return $container; } } - -class FormPassTest_Type1 extends AbstractType -{ -} - -class FormPassTest_Type2 extends AbstractType -{ -} diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php index b91d1e62eb..113144f2bf 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php @@ -43,28 +43,6 @@ class PropertyAccessorCollectionTest_Car } } -class PropertyAccessorCollectionTest_CarOnlyAdder -{ - public function addAxis($axis) - { - } - - public function getAxes() - { - } -} - -class PropertyAccessorCollectionTest_CarOnlyRemover -{ - public function removeAxis($axis) - { - } - - public function getAxes() - { - } -} - class PropertyAccessorCollectionTest_CarNoAdderAndRemover { public function getAxes() From 016a214bc5e136b205ffec90f7ea02672e32ba01 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Sun, 21 Jul 2019 19:35:01 +0200 Subject: [PATCH 06/15] Remove dead tests fixtures --- .../Controller/DefaultController.php | 21 ---------- .../Fabpot/FooBundle/FabpotFooBundle.php | 30 ------------- .../Compiler/AddSecurityVotersPassTest.php | 7 ---- .../ExtensionAbsentBundle.php | 18 -------- .../Command/FooCommand.php | 22 ---------- .../DependencyInjection/MessengerPassTest.php | 8 ---- .../Tests/Fixtures/Php71DummyChild.php | 42 ------------------- .../Controller/UserValueResolverTest.php | 8 ---- 8 files changed, 156 deletions(-) delete mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/Controller/DefaultController.php delete mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/FabpotFooBundle.php delete mode 100644 src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php delete mode 100644 src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/FooCommand.php delete mode 100644 src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php71DummyChild.php diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/Controller/DefaultController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/Controller/DefaultController.php deleted file mode 100644 index c4bee6c031..0000000000 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/Controller/DefaultController.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace TestBundle\Fabpot\FooBundle\Controller; - -/** - * DefaultController. - * - * @author Fabien Potencier - */ -class DefaultController -{ -} diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/FabpotFooBundle.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/FabpotFooBundle.php deleted file mode 100644 index 17894ba341..0000000000 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/FabpotFooBundle.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace TestBundle\Fabpot\FooBundle; - -use Symfony\Component\HttpKernel\Bundle\Bundle; - -/** - * Bundle. - * - * @author Fabien Potencier - */ -class FabpotFooBundle extends Bundle -{ - /** - * {@inheritdoc} - */ - public function getParent() - { - return 'SensioFooBundle'; - } -} diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/AddSecurityVotersPassTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/AddSecurityVotersPassTest.php index 93d4121553..2b8809fe2a 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/AddSecurityVotersPassTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/AddSecurityVotersPassTest.php @@ -148,10 +148,3 @@ class AddSecurityVotersPassTest extends TestCase $compilerPass->process($container); } } - -class VoterWithoutInterface -{ - public function vote() - { - } -} diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php deleted file mode 100644 index c8bfd36e66..0000000000 --- a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle; - -use Symfony\Component\HttpKernel\Bundle\Bundle; - -class ExtensionAbsentBundle extends Bundle -{ -} diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/FooCommand.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/FooCommand.php deleted file mode 100644 index c6570aa046..0000000000 --- a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/FooCommand.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command; - -use Symfony\Component\Console\Command\Command; - -class FooCommand extends Command -{ - protected function configure() - { - $this->setName('foo'); - } -} diff --git a/src/Symfony/Component/Messenger/Tests/DependencyInjection/MessengerPassTest.php b/src/Symfony/Component/Messenger/Tests/DependencyInjection/MessengerPassTest.php index b484bc3abe..171c263128 100644 --- a/src/Symfony/Component/Messenger/Tests/DependencyInjection/MessengerPassTest.php +++ b/src/Symfony/Component/Messenger/Tests/DependencyInjection/MessengerPassTest.php @@ -605,14 +605,6 @@ class DummyReceiver implements ReceiverInterface } } -class InvalidReceiver -{ -} - -class InvalidSender -{ -} - class UndefinedMessageHandler { public function __invoke(UndefinedMessage $message) diff --git a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php71DummyChild.php b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php71DummyChild.php deleted file mode 100644 index be26a53220..0000000000 --- a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php71DummyChild.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyInfo\Tests\Fixtures; - -class Php71DummyParent -{ - public $string; - - public function __construct(string $string) - { - $this->string = $string; - } -} - -class Php71DummyChild extends Php71DummyParent -{ - public function __construct(string $string) - { - parent::__construct($string); - } -} - -class Php71DummyChild2 extends Php71DummyParent -{ -} - -class Php71DummyChild3 extends Php71DummyParent -{ - public function __construct() - { - parent::__construct('hello'); - } -} diff --git a/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php b/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php index 25108e482d..5376583a15 100644 --- a/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php @@ -91,11 +91,3 @@ class UserValueResolverTest extends TestCase $this->assertSame([null], $argumentResolver->getArguments(Request::create('/'), function (UserInterface $user = null) {})); } } - -abstract class DummyUser implements UserInterface -{ -} - -abstract class DummySubUser extends DummyUser -{ -} From 5a14b7e039ade7b1cff2a8a7ca7c56b2eabf106e Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 22 Jul 2019 19:05:35 +0200 Subject: [PATCH 07/15] [Security/Http] Don't mark AbstractAuthenticationListener as internal --- .../Security/Http/Firewall/AbstractAuthenticationListener.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php index 58e188cc4c..6b35899073 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php @@ -48,8 +48,6 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; * * @author Fabien Potencier * @author Johannes M. Schmitt - * - * @internal since Symfony 4.3 */ abstract class AbstractAuthenticationListener implements ListenerInterface { From 19eb90d8cfeacb94730333a9d0b6caac49b49962 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Mon, 22 Jul 2019 21:22:05 +0200 Subject: [PATCH 08/15] Ignore missing translation dependency in FrameworkBundle When using symfony/framework-bundle with symfony/validator installed but without symfony/translation, the call to setTranslator will error out because of the missing translator service. Thus, the call to setTranslator needs to ignore a missing translator dependency to support this scenario. --- .../Bundle/FrameworkBundle/Resources/config/validator.xml | 2 +- .../Tests/DependencyInjection/FrameworkExtensionTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml index 8b92053b36..8a4265eea1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml @@ -23,7 +23,7 @@ - + %validator.translation_domain% diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index c114f38177..9ffb13232f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -674,7 +674,7 @@ abstract class FrameworkExtensionTest extends TestCase $this->assertSame('setConstraintValidatorFactory', $calls[0][0]); $this->assertEquals([new Reference('validator.validator_factory')], $calls[0][1]); $this->assertSame('setTranslator', $calls[1][0]); - $this->assertEquals([new Reference('translator')], $calls[1][1]); + $this->assertEquals([new Reference('translator', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)], $calls[1][1]); $this->assertSame('setTranslationDomain', $calls[2][0]); $this->assertSame(['%validator.translation_domain%'], $calls[2][1]); $this->assertSame('addXmlMappings', $calls[3][0]); From e99a6b85b844bd8daf08837c0dfc7588f508d709 Mon Sep 17 00:00:00 2001 From: Dorel Mardari Date: Sun, 28 Apr 2019 12:19:02 +0200 Subject: [PATCH 09/15] [VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4) --- .../Component/VarDumper/Cloner/VarCloner.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php index 9e50f23501..ab44a8d76b 100644 --- a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php @@ -42,7 +42,7 @@ class VarCloner extends AbstractCloner $currentDepth = 0; // Current tree depth $currentDepthFinalIndex = 0; // Final $queue index for current tree depth $minimumDepthReached = 0 === $minDepth; // Becomes true when minimum tree depth has been reached - $cookie = (object) []; // Unique object used to detect hard references + $cookie = (object) []; // Unique object used to detect hard references $a = null; // Array cast for nested structures $stub = null; // Stub capturing the main properties of an original item value // or null if the original value is used directly @@ -86,8 +86,15 @@ class VarCloner extends AbstractCloner } foreach ($vals as $k => $v) { // $v is the original value or a stub object in case of hard references - $refs[$k] = $cookie; - if ($zvalIsRef = $vals[$k] === $cookie) { + + if (\PHP_VERSION_ID >= 70400) { + $zvalIsRef = null !== \ReflectionReference::fromArrayElement($vals, $k); + } else { + $refs[$k] = $cookie; + $zvalIsRef = $vals[$k] === $cookie; + } + + if ($zvalIsRef) { $vals[$k] = &$stub; // Break hard references to make $queue completely unset($stub); // independent from the original structure if ($v instanceof Stub && isset($hardRefs[spl_object_hash($v)])) { From 40f24ef676cf568694549f957b92f7acfaace60a Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 22 Jul 2019 09:38:31 +0200 Subject: [PATCH 10/15] [VarDumper] finish PHP 7.4 support and add tests --- .../Component/VarDumper/Caster/Caster.php | 4 +- .../Component/VarDumper/Cloner/Stub.php | 12 +++- .../VarDumper/Tests/Cloner/VarClonerTest.php | 68 +++++++++++++++++++ .../VarDumper/Tests/Fixtures/Php74.php | 14 ++++ 4 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 src/Symfony/Component/VarDumper/Tests/Fixtures/Php74.php diff --git a/src/Symfony/Component/VarDumper/Caster/Caster.php b/src/Symfony/Component/VarDumper/Caster/Caster.php index ae8b40fa0e..c1f38eb4a8 100644 --- a/src/Symfony/Component/VarDumper/Caster/Caster.php +++ b/src/Symfony/Component/VarDumper/Caster/Caster.php @@ -68,8 +68,8 @@ class Caster foreach ($a as $k => $v) { if (isset($k[0]) ? "\0" !== $k[0] : \PHP_VERSION_ID >= 70200) { if (!isset($publicProperties[$class])) { - foreach (get_class_vars($class) as $prop => $v) { - $publicProperties[$class][$prop] = true; + foreach ((new \ReflectionClass($class))->getProperties(\ReflectionProperty::IS_PUBLIC) as $prop) { + $publicProperties[$class][$prop->name] = true; } } if (!isset($publicProperties[$class][$k])) { diff --git a/src/Symfony/Component/VarDumper/Cloner/Stub.php b/src/Symfony/Component/VarDumper/Cloner/Stub.php index 27dd3ef32c..19f111f478 100644 --- a/src/Symfony/Component/VarDumper/Cloner/Stub.php +++ b/src/Symfony/Component/VarDumper/Cloner/Stub.php @@ -49,11 +49,17 @@ class Stub $properties = []; if (!isset(self::$defaultProperties[$c = \get_class($this)])) { - self::$defaultProperties[$c] = get_class_vars($c); + $defaultProperties = get_class_vars($c); - foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) { - unset(self::$defaultProperties[$c][$k]); + foreach ((new \ReflectionClass($c))->getProperties(\ReflectionProperty::IS_PUBLIC) as $v) { + if ($v->isStatic()) { + unset($defaultProperties[$v->name]); + } elseif (!isset($defaultProperties[$v->name])) { + $defaultProperties[$v->name] = null; + } } + + self::$defaultProperties[$c] = $defaultProperties; } foreach (self::$defaultProperties[$c] as $k => $v) { diff --git a/src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php b/src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php index 3b180af498..f6784be498 100644 --- a/src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php @@ -13,6 +13,7 @@ namespace Symfony\Component\VarDumper\Tests\Cloner; use PHPUnit\Framework\TestCase; use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Tests\Fixtures\Php74; /** * @author Nicolas Grekas @@ -431,6 +432,73 @@ Symfony\Component\VarDumper\Cloner\Data Object [useRefHandles:Symfony\Component\VarDumper\Cloner\Data:private] => -1 ) +EOTXT; + $this->assertStringMatchesFormat($expected, print_r($clone, true)); + } + + /** + * @requires PHP 7.4 + */ + public function testPhp74() + { + $data = new Php74(); + + $cloner = new VarCloner(); + $clone = $cloner->cloneVar($data); + + $expected = <<<'EOTXT' +Symfony\Component\VarDumper\Cloner\Data Object +( + [data:Symfony\Component\VarDumper\Cloner\Data:private] => Array + ( + [0] => Array + ( + [0] => Symfony\Component\VarDumper\Cloner\Stub Object + ( + [type] => 4 + [class] => Symfony\Component\VarDumper\Tests\Fixtures\Php74 + [value] => + [cut] => 0 + [handle] => %i + [refCount] => 0 + [position] => 1 + [attr] => Array + ( + ) + + ) + + ) + + [1] => Array + ( + [p1] => 123 + [p2] => Symfony\Component\VarDumper\Cloner\Stub Object + ( + [type] => 4 + [class] => stdClass + [value] => + [cut] => 0 + [handle] => %i + [refCount] => 0 + [position] => 0 + [attr] => Array + ( + ) + + ) + + ) + + ) + + [position:Symfony\Component\VarDumper\Cloner\Data:private] => 0 + [key:Symfony\Component\VarDumper\Cloner\Data:private] => 0 + [maxDepth:Symfony\Component\VarDumper\Cloner\Data:private] => 20 + [maxItemsPerDepth:Symfony\Component\VarDumper\Cloner\Data:private] => -1 + [useRefHandles:Symfony\Component\VarDumper\Cloner\Data:private] => -1 +) + EOTXT; $this->assertStringMatchesFormat($expected, print_r($clone, true)); } diff --git a/src/Symfony/Component/VarDumper/Tests/Fixtures/Php74.php b/src/Symfony/Component/VarDumper/Tests/Fixtures/Php74.php new file mode 100644 index 0000000000..724fbeb7bd --- /dev/null +++ b/src/Symfony/Component/VarDumper/Tests/Fixtures/Php74.php @@ -0,0 +1,14 @@ +p2 = new \stdClass(); + } +} From be53c593dca3f69760d80cb0bf3d01994a65e27b Mon Sep 17 00:00:00 2001 From: Arman Hosseini <44655055+Arman-Hosseini@users.noreply.github.com> Date: Fri, 19 Jul 2019 23:09:57 +0430 Subject: [PATCH 11/15] [HttpFoundation] Fix URLs --- .../Session/Storage/Handler/MongoDbSessionHandler.php | 2 +- .../Session/Storage/Handler/NativeFileSessionHandler.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php index 3b5ccaa835..ddedacffbc 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -17,7 +17,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; * @author Markus Bachmann * * @see https://packagist.org/packages/mongodb/mongodb - * @see http://php.net/manual/en/set.mongodb.php + * @see https://php.net/mongodb */ class MongoDbSessionHandler extends AbstractSessionHandler { diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php index 4e9704bd58..04bcbbfe32 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php @@ -23,7 +23,7 @@ class NativeFileSessionHandler extends NativeSessionHandler * Default null will leave setting as defined by PHP. * '/path', 'N;/path', or 'N;octal-mode;/path * - * @see http://php.net/session.configuration.php#ini.session.save-path for further details. + * @see https://php.net/manual/session.configuration.php#ini.session.save-path for further details. * * @throws \InvalidArgumentException On invalid $savePath * @throws \RuntimeException When failing to create the save directory From 9bad90578ae21b7f7b7be914df9250a75f913556 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 23 Jul 2019 10:15:01 +0200 Subject: [PATCH 12/15] revert private properties handling --- src/Symfony/Component/VarDumper/Cloner/Stub.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Component/VarDumper/Cloner/Stub.php b/src/Symfony/Component/VarDumper/Cloner/Stub.php index 19f111f478..27dd3ef32c 100644 --- a/src/Symfony/Component/VarDumper/Cloner/Stub.php +++ b/src/Symfony/Component/VarDumper/Cloner/Stub.php @@ -49,17 +49,11 @@ class Stub $properties = []; if (!isset(self::$defaultProperties[$c = \get_class($this)])) { - $defaultProperties = get_class_vars($c); + self::$defaultProperties[$c] = get_class_vars($c); - foreach ((new \ReflectionClass($c))->getProperties(\ReflectionProperty::IS_PUBLIC) as $v) { - if ($v->isStatic()) { - unset($defaultProperties[$v->name]); - } elseif (!isset($defaultProperties[$v->name])) { - $defaultProperties[$v->name] = null; - } + foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) { + unset(self::$defaultProperties[$c][$k]); } - - self::$defaultProperties[$c] = $defaultProperties; } foreach (self::$defaultProperties[$c] as $k => $v) { From 775d970927ef26adf36bc1e570b95687f205c534 Mon Sep 17 00:00:00 2001 From: Jan van Thoor Date: Fri, 19 Jul 2019 15:02:52 +0200 Subject: [PATCH 13/15] [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion --- src/Symfony/Bundle/FrameworkBundle/Tests/ClientTest.php | 4 ++-- .../Functional/{WebTestCase.php => AbstractWebTestCase.php} | 2 +- .../Tests/Functional/AnnotatedControllerTest.php | 2 +- .../FrameworkBundle/Tests/Functional/AutowiringTypesTest.php | 2 +- .../Tests/Functional/CachePoolClearCommandTest.php | 2 +- .../FrameworkBundle/Tests/Functional/CachePoolsTest.php | 2 +- .../Tests/Functional/ConfigDebugCommandTest.php | 2 +- .../Tests/Functional/ConfigDumpReferenceCommandTest.php | 2 +- .../Tests/Functional/ContainerDebugCommandTest.php | 2 +- .../FrameworkBundle/Tests/Functional/ContainerDumpTest.php | 2 +- .../Tests/Functional/DebugAutowiringCommandTest.php | 2 +- .../Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php | 2 +- .../Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php | 2 +- .../FrameworkBundle/Tests/Functional/PropertyInfoTest.php | 2 +- .../FrameworkBundle/Tests/Functional/SerializerTest.php | 2 +- .../Bundle/FrameworkBundle/Tests/Functional/SessionTest.php | 2 +- .../FrameworkBundle/Tests/Functional/SubRequestsTest.php | 2 +- .../Functional/{WebTestCase.php => AbstractWebTestCase.php} | 2 +- .../Tests/Functional/AuthenticationCommencingTest.php | 2 +- .../SecurityBundle/Tests/Functional/AutowiringTypesTest.php | 2 +- .../SecurityBundle/Tests/Functional/CsrfFormLoginTest.php | 2 +- .../Tests/Functional/FirewallEntryPointTest.php | 2 +- .../Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php | 2 +- .../Bundle/SecurityBundle/Tests/Functional/JsonLoginTest.php | 2 +- .../Tests/Functional/LocalizedRoutesAsPathTest.php | 2 +- .../Bundle/SecurityBundle/Tests/Functional/LogoutTest.php | 2 +- .../Tests/Functional/SecurityRoutingIntegrationTest.php | 2 +- .../Bundle/SecurityBundle/Tests/Functional/SecurityTest.php | 2 +- .../SecurityBundle/Tests/Functional/SetAclCommandTest.php | 2 +- .../Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php | 2 +- .../Tests/Functional/UserPasswordEncoderCommandTest.php | 2 +- 31 files changed, 32 insertions(+), 32 deletions(-) rename src/Symfony/Bundle/FrameworkBundle/Tests/Functional/{WebTestCase.php => AbstractWebTestCase.php} (97%) rename src/Symfony/Bundle/SecurityBundle/Tests/Functional/{WebTestCase.php => AbstractWebTestCase.php} (97%) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/ClientTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/ClientTest.php index ba253d1d1f..3ff7daac5e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/ClientTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/ClientTest.php @@ -12,10 +12,10 @@ namespace Symfony\Bundle\FrameworkBundle\Tests; use Symfony\Bundle\FrameworkBundle\Client; -use Symfony\Bundle\FrameworkBundle\Tests\Functional\WebTestCase; +use Symfony\Bundle\FrameworkBundle\Tests\Functional\AbstractWebTestCase; use Symfony\Component\HttpFoundation\Response; -class ClientTest extends WebTestCase +class ClientTest extends AbstractWebTestCase { public function testRebootKernelBetweenRequests() { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/WebTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractWebTestCase.php similarity index 97% rename from src/Symfony/Bundle/FrameworkBundle/Tests/Functional/WebTestCase.php rename to src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractWebTestCase.php index 00eda65709..03c6bdcbd7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/WebTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractWebTestCase.php @@ -14,7 +14,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase; use Symfony\Component\Filesystem\Filesystem; -class WebTestCase extends BaseWebTestCase +abstract class AbstractWebTestCase extends BaseWebTestCase { public static function assertRedirect($response, $location) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php index 51a3e7ee54..c9ede7a9cf 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; -class AnnotatedControllerTest extends WebTestCase +class AnnotatedControllerTest extends AbstractWebTestCase { /** * @dataProvider getRoutes diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.php index 1db447ac64..95fb5f938f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.php @@ -20,7 +20,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher; use Symfony\Component\Templating\EngineInterface as ComponentEngineInterface; -class AutowiringTypesTest extends WebTestCase +class AutowiringTypesTest extends AbstractWebTestCase { public function testAnnotationReaderAutowiring() { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php index e3fd2dc4ab..e30a0e1eea 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php @@ -18,7 +18,7 @@ use Symfony\Component\Console\Tester\CommandTester; /** * @group functional */ -class CachePoolClearCommandTest extends WebTestCase +class CachePoolClearCommandTest extends AbstractWebTestCase { protected function setUp() { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php index 2a6d43a9f8..ebf6561a61 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php @@ -15,7 +15,7 @@ use Symfony\Component\Cache\Adapter\AdapterInterface; use Symfony\Component\Cache\Adapter\RedisAdapter; use Symfony\Component\Cache\Exception\InvalidArgumentException; -class CachePoolsTest extends WebTestCase +class CachePoolsTest extends AbstractWebTestCase { public function testCachePools() { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php index 2c0a75481b..c10750eaa9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php @@ -19,7 +19,7 @@ use Symfony\Component\Console\Tester\CommandTester; /** * @group functional */ -class ConfigDebugCommandTest extends WebTestCase +class ConfigDebugCommandTest extends AbstractWebTestCase { private $application; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php index a4cfd6cfa9..b8ac6645f6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php @@ -19,7 +19,7 @@ use Symfony\Component\Console\Tester\CommandTester; /** * @group functional */ -class ConfigDumpReferenceCommandTest extends WebTestCase +class ConfigDumpReferenceCommandTest extends AbstractWebTestCase { private $application; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php index bfec01aefc..21f33df0c8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php @@ -17,7 +17,7 @@ use Symfony\Component\Console\Tester\ApplicationTester; /** * @group functional */ -class ContainerDebugCommandTest extends WebTestCase +class ContainerDebugCommandTest extends AbstractWebTestCase { public function testDumpContainerIfNotExists() { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDumpTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDumpTest.php index 7c3128dc5c..ad2a3662c3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDumpTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDumpTest.php @@ -14,7 +14,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; /** * Checks that the container compiles correctly when all the bundle features are enabled. */ -class ContainerDumpTest extends WebTestCase +class ContainerDumpTest extends AbstractWebTestCase { public function testContainerCompilationInDebug() { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php index 7e41d3298d..8e55eb5d84 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php @@ -17,7 +17,7 @@ use Symfony\Component\Console\Tester\ApplicationTester; /** * @group functional */ -class DebugAutowiringCommandTest extends WebTestCase +class DebugAutowiringCommandTest extends AbstractWebTestCase { public function testBasicFunctionality() { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php index db550a2312..3e7472af99 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; -class FragmentTest extends WebTestCase +class FragmentTest extends AbstractWebTestCase { /** * @dataProvider getConfigs diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php index 2768b59a1c..ec3c47e762 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; -class ProfilerTest extends WebTestCase +class ProfilerTest extends AbstractWebTestCase { /** * @dataProvider getConfigs diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/PropertyInfoTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/PropertyInfoTest.php index 832b45b818..23a9cf18d0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/PropertyInfoTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/PropertyInfoTest.php @@ -13,7 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; use Symfony\Component\PropertyInfo\Type; -class PropertyInfoTest extends WebTestCase +class PropertyInfoTest extends AbstractWebTestCase { public function testPhpDocPriority() { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php index c2c53ef7b0..c1159ff566 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php @@ -14,7 +14,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; /** * @author Kévin Dunglas */ -class SerializerTest extends WebTestCase +class SerializerTest extends AbstractWebTestCase { public function testDeserializeArrayOfObject() { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php index bf1b76cdc7..0fa8a09b4b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; -class SessionTest extends WebTestCase +class SessionTest extends AbstractWebTestCase { /** * Tests session attributes persist. diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SubRequestsTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SubRequestsTest.php index 9d040581db..d32b6b7b12 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SubRequestsTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SubRequestsTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; -class SubRequestsTest extends WebTestCase +class SubRequestsTest extends AbstractWebTestCase { public function testStateAfterSubRequest() { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AbstractWebTestCase.php similarity index 97% rename from src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php rename to src/Symfony/Bundle/SecurityBundle/Tests/Functional/AbstractWebTestCase.php index 9bcbc05324..72a67a9a48 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AbstractWebTestCase.php @@ -14,7 +14,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase; use Symfony\Component\Filesystem\Filesystem; -class WebTestCase extends BaseWebTestCase +class AbstractWebTestCase extends BaseWebTestCase { public static function assertRedirect($response, $location) { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticationCommencingTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticationCommencingTest.php index 2a31f2a27a..dcfd6f29e8 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticationCommencingTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticationCommencingTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; -class AuthenticationCommencingTest extends WebTestCase +class AuthenticationCommencingTest extends AbstractWebTestCase { public function testAuthenticationIsCommencingIfAccessDeniedExceptionIsWrapped() { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AutowiringTypesTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AutowiringTypesTest.php index 95b86985cb..1e4b14a61b 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AutowiringTypesTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AutowiringTypesTest.php @@ -14,7 +14,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; use Symfony\Component\Security\Core\Authorization\AccessDecisionManager; use Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager; -class AutowiringTypesTest extends WebTestCase +class AutowiringTypesTest extends AbstractWebTestCase { public function testAccessDecisionManagerAutowiring() { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php index 98b52a5f05..a701c8e4ea 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; -class CsrfFormLoginTest extends WebTestCase +class CsrfFormLoginTest extends AbstractWebTestCase { /** * @dataProvider getConfigs diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FirewallEntryPointTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FirewallEntryPointTest.php index 8afedc42e4..77011409cf 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FirewallEntryPointTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FirewallEntryPointTest.php @@ -13,7 +13,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; use Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FirewallEntryPointBundle\Security\EntryPointStub; -class FirewallEntryPointTest extends WebTestCase +class FirewallEntryPointTest extends AbstractWebTestCase { public function testItUsesTheConfiguredEntryPointWhenUsingUnknownCredentials() { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php index ec1722188a..af932a3ce4 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; -class FormLoginTest extends WebTestCase +class FormLoginTest extends AbstractWebTestCase { /** * @dataProvider getConfigs diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/JsonLoginTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/JsonLoginTest.php index c7e9e2aab7..2859693a17 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/JsonLoginTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/JsonLoginTest.php @@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\JsonResponse; /** * @author Kévin Dunglas */ -class JsonLoginTest extends WebTestCase +class JsonLoginTest extends AbstractWebTestCase { public function testDefaultJsonLoginSuccess() { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php index c874ada34a..2a45fc00de 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; -class LocalizedRoutesAsPathTest extends WebTestCase +class LocalizedRoutesAsPathTest extends AbstractWebTestCase { /** * @dataProvider getLocales diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LogoutTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LogoutTest.php index 31ff6d1bbc..7167b062da 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LogoutTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LogoutTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; -class LogoutTest extends WebTestCase +class LogoutTest extends AbstractWebTestCase { public function testSessionLessRememberMeLogout() { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php index 0d2d6da0cf..590c871569 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; -class SecurityRoutingIntegrationTest extends WebTestCase +class SecurityRoutingIntegrationTest extends AbstractWebTestCase { /** * @dataProvider getConfigs diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php index ff687d0792..eb83e75d8c 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php @@ -14,7 +14,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\User\User; -class SecurityTest extends WebTestCase +class SecurityTest extends AbstractWebTestCase { public function testServiceIsFunctional() { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php index 2035868e16..5346e9b4c0 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php @@ -35,7 +35,7 @@ use Symfony\Component\Security\Acl\Permission\BasicPermissionMap; * @requires extension pdo_sqlite * @group legacy */ -class SetAclCommandTest extends WebTestCase +class SetAclCommandTest extends AbstractWebTestCase { const OBJECT_CLASS = 'Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity\Car'; const SECURITY_CLASS = 'Symfony\Component\Security\Core\User\User'; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php index ddbfd629c8..31f99da2a0 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php @@ -14,7 +14,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Security\Http\Firewall\SwitchUserListener; -class SwitchUserTest extends WebTestCase +class SwitchUserTest extends AbstractWebTestCase { /** * @dataProvider getTestParameters diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php index c8f8013f3f..3533f554ba 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php @@ -25,7 +25,7 @@ use Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder; * * @author Sarah Khalil */ -class UserPasswordEncoderCommandTest extends WebTestCase +class UserPasswordEncoderCommandTest extends AbstractWebTestCase { /** @var CommandTester */ private $passwordEncoderCommandTester; From 12bf0b07f82a76d2f107cf06ba6e10f6f3efe68f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 23 Jul 2019 13:15:07 +0200 Subject: [PATCH 14/15] ignore not existing translator service --- .../FrameworkBundle/DependencyInjection/FrameworkExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index a41555fde4..fca90e76cf 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -1122,7 +1122,7 @@ class FrameworkExtension extends Extension if (interface_exists(TranslatorInterface::class) && class_exists(LegacyTranslatorProxy::class)) { $calls = $validatorBuilder->getMethodCalls(); - $calls[1] = ['setTranslator', [new Definition(LegacyTranslatorProxy::class, [new Reference('translator')])]]; + $calls[1] = ['setTranslator', [new Definition(LegacyTranslatorProxy::class, [new Reference('translator', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])]]; $validatorBuilder->setMethodCalls($calls); } From 01aaece8d8a8ea02c5c161ee5ac131d41a8d3fb4 Mon Sep 17 00:00:00 2001 From: Jan van Thoor Date: Fri, 19 Jul 2019 15:53:13 +0200 Subject: [PATCH 15/15] [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion --- .../FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php | 2 +- .../Tests/Functional/TestServiceContainerTest.php | 2 +- .../SecurityBundle/Tests/Functional/AbstractWebTestCase.php | 2 +- .../SecurityBundle/Tests/Functional/JsonLoginLdapTest.php | 2 +- .../SecurityBundle/Tests/Functional/MissingUserProviderTest.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php index 73f84f842f..a13a4e9fc9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php @@ -17,7 +17,7 @@ use Symfony\Component\Console\Tester\CommandTester; /** * @group functional */ -class RouterDebugCommandTest extends WebTestCase +class RouterDebugCommandTest extends AbstractWebTestCase { private $application; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TestServiceContainerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TestServiceContainerTest.php index baa12ab2d1..bf4f9f8779 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TestServiceContainerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TestServiceContainerTest.php @@ -18,7 +18,7 @@ use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestServic use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestServiceContainer\UnusedPrivateService; use Symfony\Component\DependencyInjection\ContainerInterface; -class TestServiceContainerTest extends WebTestCase +class TestServiceContainerTest extends AbstractWebTestCase { public function testThatPrivateServicesAreUnavailableIfTestConfigIsDisabled() { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AbstractWebTestCase.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AbstractWebTestCase.php index 72a67a9a48..678c937f7d 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AbstractWebTestCase.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AbstractWebTestCase.php @@ -14,7 +14,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase; use Symfony\Component\Filesystem\Filesystem; -class AbstractWebTestCase extends BaseWebTestCase +abstract class AbstractWebTestCase extends BaseWebTestCase { public static function assertRedirect($response, $location) { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/JsonLoginLdapTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/JsonLoginLdapTest.php index 6b7dca4b42..583e153695 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/JsonLoginLdapTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/JsonLoginLdapTest.php @@ -13,7 +13,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; use Symfony\Component\HttpKernel\Kernel; -class JsonLoginLdapTest extends WebTestCase +class JsonLoginLdapTest extends AbstractWebTestCase { public function testKernelBoot() { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/MissingUserProviderTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/MissingUserProviderTest.php index 378ff26b38..d645f97f5b 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/MissingUserProviderTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/MissingUserProviderTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; -class MissingUserProviderTest extends WebTestCase +class MissingUserProviderTest extends AbstractWebTestCase { /** * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException