diff --git a/.travis.yml b/.travis.yml index 9f4eda2ae16b..e243c98aa6f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,6 @@ env: global: - MIN_PHP=7.1.3 - SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/shims/php - - SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 - MESSENGER_AMQP_DSN=amqp://localhost/%2f/messages - MESSENGER_REDIS_DSN=redis://127.0.0.1:7001/messages diff --git a/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php b/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php index b3fb8bc3ac94..2b259076f695 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php @@ -20,7 +20,7 @@ class ContainerAwareEventManagerTest extends TestCase private $container; private $evm; - protected function setUp() + protected function setUp(): void { $this->container = new Container(); $this->evm = new ContainerAwareEventManager($this->container); diff --git a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php index 044c48b9e859..1efdf31abf09 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php @@ -26,7 +26,7 @@ class DoctrineExtensionTest extends TestCase */ private $extension; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php index 56b38f0d8c7e..0fa4d5676fda 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php @@ -73,7 +73,7 @@ class DoctrineChoiceLoaderTest extends TestCase */ private $obj3; - protected function setUp() + protected function setUp(): void { $this->factory = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface')->getMock(); $this->om = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager')->getMock(); diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php index 217456a523e0..9891fb24798c 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php @@ -25,7 +25,7 @@ class CollectionToArrayTransformerTest extends TestCase */ private $transformer; - protected function setUp() + protected function setUp(): void { $this->transformer = new CollectionToArrayTransformer(); } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/EventListener/MergeDoctrineCollectionListenerTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/EventListener/MergeDoctrineCollectionListenerTest.php index 757cdc3934c9..31fe0c5db6fa 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/EventListener/MergeDoctrineCollectionListenerTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/EventListener/MergeDoctrineCollectionListenerTest.php @@ -28,7 +28,7 @@ class MergeDoctrineCollectionListenerTest extends TestCase private $factory; private $form; - protected function setUp() + protected function setUp(): void { $this->collection = new ArrayCollection(['test']); $this->dispatcher = new EventDispatcher(); @@ -37,7 +37,7 @@ protected function setUp() ->getForm(); } - protected function tearDown() + protected function tearDown(): void { $this->collection = null; $this->dispatcher = null; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php index 5dc184fb9100..e5d430391110 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php @@ -50,7 +50,7 @@ protected function getExtensions() ]; } - protected function setUp() + protected function setUp(): void { $this->em = DoctrineTestHelper::createTestEntityManager(); diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index f8f8c9379497..0f530d37d62a 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -60,7 +60,7 @@ class EntityTypeTest extends BaseTypeTest protected static $supportedFeatureSetVersion = 304; - protected function setUp() + protected function setUp(): void { $this->em = DoctrineTestHelper::createTestEntityManager(); $this->emRegistry = $this->createRegistryMock('default', $this->em); @@ -90,7 +90,7 @@ protected function setUp() } } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php b/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php index e5ebeeacf813..624e5a5a3469 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php @@ -17,7 +17,7 @@ class ManagerRegistryTest extends TestCase { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!class_exists('PHPUnit_Framework_TestCase')) { self::markTestSkipped('proxy-manager-bridge is not yet compatible with namespaced phpunit versions.'); diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php index ff29b1f284c4..fdf0b550ce2f 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php @@ -58,7 +58,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase protected $repositoryFactory; - protected function setUp() + protected function setUp(): void { $this->repositoryFactory = new TestRepositoryFactory(); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php b/src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php index 5b92ccd8507e..5af0617ba5a7 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php +++ b/src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php @@ -21,12 +21,12 @@ */ class ClockMockTest extends TestCase { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { ClockMock::register(__CLASS__); } - protected function setUp() + protected function setUp(): void { ClockMock::withClockMock(1234567890.125); } diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php b/src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php index a178ac7e898c..66c7684897d8 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php +++ b/src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php @@ -16,7 +16,7 @@ class DnsMockTest extends TestCase { - protected function tearDown() + protected function tearDown(): void { DnsMock::withMockedHosts(array()); } diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php index e58b7d635616..e53fb43c1f75 100644 --- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php +++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php @@ -30,7 +30,7 @@ class RuntimeInstantiatorTest extends TestCase /** * {@inheritdoc} */ - protected function setUp() + protected function setUp(): void { $this->instantiator = new RuntimeInstantiator(); } diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php index abb0c8abbfa7..664b996f5735 100644 --- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php +++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php @@ -32,7 +32,7 @@ class ProxyDumperTest extends TestCase /** * {@inheritdoc} */ - protected function setUp() + protected function setUp(): void { $this->dumper = new ProxyDumper(); } diff --git a/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php b/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php index ddeb76b75aa5..5a91d3e06dce 100644 --- a/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php +++ b/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php @@ -15,7 +15,7 @@ class AppVariableTest extends TestCase */ protected $appVariable; - protected function setUp() + protected function setUp(): void { $this->appVariable = new AppVariable(); } diff --git a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php index df99cd751846..c862b08fe111 100644 --- a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php @@ -93,12 +93,12 @@ private function createFile($content) return $filename; } - protected function setUp() + protected function setUp(): void { $this->files = []; } - protected function tearDown() + protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php index 384b9391cc4d..61be57e1a628 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php @@ -33,7 +33,7 @@ class FormExtensionBootstrap3HorizontalLayoutTest extends AbstractBootstrap3Hori */ private $renderer; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3LayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3LayoutTest.php index 2e75e3f7a852..9dcefcbee3e1 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3LayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3LayoutTest.php @@ -29,7 +29,7 @@ class FormExtensionBootstrap3LayoutTest extends AbstractBootstrap3LayoutTest */ private $renderer; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4HorizontalLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4HorizontalLayoutTest.php index 243658764cc0..a7222867d1fc 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4HorizontalLayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4HorizontalLayoutTest.php @@ -35,7 +35,7 @@ class FormExtensionBootstrap4HorizontalLayoutTest extends AbstractBootstrap4Hori private $renderer; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4LayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4LayoutTest.php index a0290a2049da..ee13f62ceac2 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4LayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4LayoutTest.php @@ -33,7 +33,7 @@ class FormExtensionBootstrap4LayoutTest extends AbstractBootstrap4LayoutTest */ private $renderer; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php index e40e57505a0a..a83c8599907e 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php @@ -33,7 +33,7 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest protected static $supportedFeatureSetVersion = 403; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php index 9570e03e523c..1d6a1df56a87 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php @@ -32,7 +32,7 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest protected static $supportedFeatureSetVersion = 403; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/WebLinkExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/WebLinkExtensionTest.php index f49eea396d0d..332165571c9a 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/WebLinkExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/WebLinkExtensionTest.php @@ -32,7 +32,7 @@ class WebLinkExtensionTest extends TestCase */ private $extension; - protected function setUp() + protected function setUp(): void { $this->request = new Request(); diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/WorkflowExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/WorkflowExtensionTest.php index 3e948bae3f50..57a09b0a7e91 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/WorkflowExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/WorkflowExtensionTest.php @@ -28,7 +28,7 @@ class WorkflowExtensionTest extends TestCase private $extension; private $t1; - protected function setUp() + protected function setUp(): void { if (!class_exists(Workflow::class)) { $this->markTestSkipped('The Workflow component is needed to run tests for this extension.'); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/AnnotationsCacheWarmerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/AnnotationsCacheWarmerTest.php index 1ff38dfdae6a..ca90187a8d99 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/AnnotationsCacheWarmerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/AnnotationsCacheWarmerTest.php @@ -17,7 +17,7 @@ class AnnotationsCacheWarmerTest extends TestCase { private $cacheDir; - protected function setUp() + protected function setUp(): void { $this->cacheDir = sys_get_temp_dir().'/'.uniqid(); $fs = new Filesystem(); @@ -25,7 +25,7 @@ protected function setUp() parent::setUp(); } - protected function tearDown() + protected function tearDown(): void { $fs = new Filesystem(); $fs->remove($this->cacheDir); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplatePathsCacheWarmerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplatePathsCacheWarmerTest.php index ea05f965f64c..f4853162d2f0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplatePathsCacheWarmerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplatePathsCacheWarmerTest.php @@ -38,7 +38,7 @@ class TemplatePathsCacheWarmerTest extends TestCase private $tmpDir; - protected function setUp() + protected function setUp(): void { $this->templateFinder = $this ->getMockBuilder(TemplateFinderInterface::class) @@ -59,7 +59,7 @@ protected function setUp() $this->filesystem->mkdir($this->tmpDir); } - protected function tearDown() + protected function tearDown(): void { $this->filesystem->remove($this->tmpDir); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php index 9e4c46d58555..d70f92b7e60d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php @@ -28,14 +28,14 @@ class CacheClearCommandTest extends TestCase /** @var Filesystem */ private $fs; - protected function setUp() + protected function setUp(): void { $this->fs = new Filesystem(); $this->kernel = new TestAppKernel('test', true); $this->fs->mkdir($this->kernel->getProjectDir()); } - protected function tearDown() + protected function tearDown(): void { $this->fs->remove($this->kernel->getProjectDir()); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php index 4baa41180af7..a439b6f873fd 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php @@ -127,7 +127,7 @@ public function testDebugInvalidDirectory() $tester->execute(['locale' => 'en', 'bundle' => 'dir']); } - protected function setUp() + protected function setUp(): void { $this->fs = new Filesystem(); $this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true); @@ -135,7 +135,7 @@ protected function setUp() $this->fs->mkdir($this->translationDir.'/templates'); } - protected function tearDown() + protected function tearDown(): void { $this->fs->remove($this->translationDir); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php index 999ee459d66e..2471c9f7e390 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php @@ -105,7 +105,7 @@ public function testWriteMessagesForSpecificDomain() $this->assertRegExp('/Translation files were successfully updated./', $tester->getDisplay()); } - protected function setUp() + protected function setUp(): void { $this->fs = new Filesystem(); $this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true); @@ -113,7 +113,7 @@ protected function setUp() $this->fs->mkdir($this->translationDir.'/templates'); } - protected function tearDown() + protected function tearDown(): void { $this->fs->remove($this->translationDir); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php index 410ab4f90c8f..969c430b278c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php @@ -181,13 +181,13 @@ private function getKernelAwareApplicationMock() return $application; } - protected function setUp() + protected function setUp(): void { @mkdir(sys_get_temp_dir().'/yml-lint-test'); $this->files = []; } - protected function tearDown() + protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php index e775ac7cf199..4ed0446320c1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php @@ -15,12 +15,12 @@ class TextDescriptorTest extends AbstractDescriptorTest { - protected function setUp() + protected function setUp(): void { putenv('COLUMNS=121'); } - protected function tearDown() + protected function tearDown(): void { putenv('COLUMNS'); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php index bdee7c8ecfec..f8eccbb75e84 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php @@ -23,7 +23,7 @@ class ControllerNameParserTest extends TestCase { protected $loader; - protected function setUp() + protected function setUp(): void { $this->loader = new ClassLoader(); $this->loader->add('TestBundle', __DIR__.'/../Fixtures'); @@ -31,7 +31,7 @@ protected function setUp() $this->loader->register(); } - protected function tearDown() + protected function tearDown(): void { $this->loader->unregister(); $this->loader = null; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPassTest.php index 502dac726f40..6bc90a478fd5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPassTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/CachePoolPassTest.php @@ -26,7 +26,7 @@ class CachePoolPassTest extends TestCase { private $cachePoolPass; - protected function setUp() + protected function setUp(): void { $this->cachePoolPass = new CachePoolPass(); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php index 4496c7927e4c..d78e0c24924e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php @@ -22,7 +22,7 @@ class DataCollectorTranslatorPassTest extends TestCase private $container; private $dataCollectorTranslatorPass; - protected function setUp() + protected function setUp(): void { $this->container = new ContainerBuilder(); $this->dataCollectorTranslatorPass = new DataCollectorTranslatorPass(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/WorkflowGuardListenerPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/WorkflowGuardListenerPassTest.php index a267908ec086..cab03fd9c828 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/WorkflowGuardListenerPassTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/WorkflowGuardListenerPassTest.php @@ -25,7 +25,7 @@ class WorkflowGuardListenerPassTest extends TestCase private $container; private $compilerPass; - protected function setUp() + protected function setUp(): void { $this->container = new ContainerBuilder(); $this->compilerPass = new WorkflowGuardListenerPass(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractWebTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractWebTestCase.php index 03c6bdcbd7e1..7e8b50f36739 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractWebTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractWebTestCase.php @@ -22,12 +22,12 @@ public static function assertRedirect($response, $location) self::assertEquals('http://localhost'.$location, $response->headers->get('Location')); } - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { static::deleteTmpDir(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { static::deleteTmpDir(); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php index a47b78933b51..01a99c2f37b5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php @@ -20,7 +20,7 @@ */ class CachePoolClearCommandTest extends AbstractWebTestCase { - protected function setUp() + protected function setUp(): void { static::bootKernel(['test_case' => 'CachePoolClear', 'root_config' => 'config.yml']); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php index 5832a98c7e21..788663bf6c62 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php @@ -23,7 +23,7 @@ class ConfigDebugCommandTest extends AbstractWebTestCase { private $application; - protected function setUp() + protected function setUp(): void { $kernel = static::createKernel(['test_case' => 'ConfigDump', 'root_config' => 'config.yml']); $this->application = new Application($kernel); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php index aa5dba65c0ff..26dd97f00db3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php @@ -23,7 +23,7 @@ class ConfigDumpReferenceCommandTest extends AbstractWebTestCase { private $application; - protected function setUp() + protected function setUp(): void { $kernel = static::createKernel(['test_case' => 'ConfigDump', 'root_config' => 'config.yml']); $this->application = new Application($kernel); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php index 4c3e57d88f20..a892ebeddc74 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php @@ -23,7 +23,7 @@ class GlobalVariablesTest extends TestCase private $container; private $globals; - protected function setUp() + protected function setUp(): void { $this->container = new Container(); $this->globals = new GlobalVariables($this->container); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php index 06e87f43f72f..8861ff6eb9ff 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php @@ -24,7 +24,7 @@ class AssetsHelperTest extends TestCase { private $helper; - protected function setUp() + protected function setUp(): void { $fooPackage = new Package(new StaticVersionStrategy('42', '%s?v=%s')); $barPackage = new Package(new StaticVersionStrategy('22', '%s?%s')); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php index 729b01920f7d..0b70ac77736a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php @@ -55,7 +55,7 @@ protected function getExtensions() ]); } - protected function tearDown() + protected function tearDown(): void { $this->engine = null; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php index 8e335788ea33..80bdfedfe628 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php @@ -100,7 +100,7 @@ protected function getExtensions() ]); } - protected function tearDown() + protected function tearDown(): void { $this->engine = null; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/RequestHelperTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/RequestHelperTest.php index d29b5c0ff47b..cddb14e5f9df 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/RequestHelperTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/RequestHelperTest.php @@ -23,7 +23,7 @@ class RequestHelperTest extends TestCase { protected $requestStack; - protected function setUp() + protected function setUp(): void { $this->requestStack = new RequestStack(); $request = new Request(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php index c9521e8e5407..0ee9930efddf 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php @@ -25,7 +25,7 @@ class SessionHelperTest extends TestCase { protected $requestStack; - protected function setUp() + protected function setUp(): void { $request = new Request(); @@ -39,7 +39,7 @@ protected function setUp() $this->requestStack->push($request); } - protected function tearDown() + protected function tearDown(): void { $this->requestStack = null; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateFilenameParserTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateFilenameParserTest.php index 305be175910b..58e671ddf358 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateFilenameParserTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateFilenameParserTest.php @@ -22,12 +22,12 @@ class TemplateFilenameParserTest extends TestCase { protected $parser; - protected function setUp() + protected function setUp(): void { $this->parser = new TemplateFilenameParser(); } - protected function tearDown() + protected function tearDown(): void { $this->parser = null; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateNameParserTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateNameParserTest.php index 34b44d0712c1..d3e8272d22c6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateNameParserTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateNameParserTest.php @@ -23,7 +23,7 @@ class TemplateNameParserTest extends TestCase { protected $parser; - protected function setUp() + protected function setUp(): void { $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock(); $kernel @@ -40,7 +40,7 @@ protected function setUp() $this->parser = new TemplateNameParser($kernel); } - protected function tearDown() + protected function tearDown(): void { $this->parser = null; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php index 48e2db438420..26753e8a8a54 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php @@ -24,13 +24,13 @@ class TranslatorTest extends TestCase { protected $tmpDir; - protected function setUp() + protected function setUp(): void { $this->tmpDir = sys_get_temp_dir().'/sf_translation'; $this->deleteTmpDir(); } - protected function tearDown() + protected function tearDown(): void { $this->deleteTmpDir(); } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AbstractWebTestCase.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AbstractWebTestCase.php index 678c937f7d42..61d0081200b7 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AbstractWebTestCase.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AbstractWebTestCase.php @@ -22,12 +22,12 @@ public static function assertRedirect($response, $location) self::assertEquals('http://localhost'.$location, $response->headers->get('Location')); } - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { static::deleteTmpDir(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { static::deleteTmpDir(); } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php index 55064d863a19..44ab7e265249 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php @@ -286,7 +286,7 @@ public function testThrowsExceptionOnNoConfiguredEncoders() ], ['interactive' => false]); } - protected function setUp() + protected function setUp(): void { putenv('COLUMNS='.(119 + \strlen(PHP_EOL))); $kernel = $this->createKernel(['test_case' => 'PasswordEncode']); @@ -299,7 +299,7 @@ protected function setUp() $this->passwordEncoderCommandTester = new CommandTester($passwordEncoderCommand); } - protected function tearDown() + protected function tearDown(): void { $this->passwordEncoderCommandTester = null; } diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/TwigLoaderPassTest.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/TwigLoaderPassTest.php index a112b64b5573..fe7c525179e1 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/TwigLoaderPassTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/TwigLoaderPassTest.php @@ -31,7 +31,7 @@ class TwigLoaderPassTest extends TestCase */ private $pass; - protected function setUp() + protected function setUp(): void { $this->builder = new ContainerBuilder(); $this->builder->register('twig'); diff --git a/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php b/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php index ca21df09029b..f8bef0069aa2 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php @@ -47,12 +47,12 @@ public function testCacheIsProperlyWarmedWhenTemplatingIsDisabled() $this->assertFileExists($kernel->getCacheDir().'/twig'); } - protected function setUp() + protected function setUp(): void { $this->deleteTempDir(); } - protected function tearDown() + protected function tearDown(): void { $this->deleteTempDir(); } diff --git a/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php b/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php index e3451ccc31cd..4f880fdabe22 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php @@ -30,12 +30,12 @@ public function test() $this->assertStringContainsString('{ a: b }', $content); } - protected function setUp() + protected function setUp(): void { $this->deleteTempDir(); } - protected function tearDown() + protected function tearDown(): void { $this->deleteTempDir(); } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php index b5633bb409ec..60ab19f24709 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php @@ -46,7 +46,7 @@ public static function assertSaneContainer(Container $container, $message = '', self::assertEquals([], $errors, $message); } - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -73,7 +73,7 @@ protected function setUp() $this->container->addCompilerPass(new RegisterListenersPass()); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php index f777917f0e84..ae4d8c7ca2eb 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php @@ -38,7 +38,7 @@ class TemplateManagerTest extends TestCase */ protected $templateManager; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTest.php index d1fa9535cf5c..2d1024069de5 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTest.php @@ -28,7 +28,7 @@ public function createCachePool($defaultLifetime = 0) return new RedisAdapter(self::$redis, str_replace('\\', '.', __CLASS__), $defaultLifetime); } - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!\extension_loaded('redis')) { self::markTestSkipped('Extension redis required.'); @@ -39,7 +39,7 @@ public static function setUpBeforeClass() } } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { self::$redis = null; } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php b/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php index 93318ffd481f..36051dcb86c7 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php @@ -21,7 +21,7 @@ abstract class AdapterTestCase extends CachePoolTest { - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Component/Cache/Tests/Adapter/FilesystemAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/FilesystemAdapterTest.php index fa8306826e5d..b7a69cb4472a 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/FilesystemAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/FilesystemAdapterTest.php @@ -24,7 +24,7 @@ public function createCachePool($defaultLifetime = 0) return new FilesystemAdapter('', $defaultLifetime); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { self::rmdir(sys_get_temp_dir().'/symfony-cache'); } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php index 13dae92f963a..9f77072b4a44 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php @@ -23,7 +23,7 @@ class MemcachedAdapterTest extends AdapterTestCase protected static $client; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!MemcachedAdapter::isSupported()) { self::markTestSkipped('Extension memcached >=2.2.0 required.'); diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php index dd2a911858b3..cd4b95cf0e2f 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php @@ -23,7 +23,7 @@ class PdoAdapterTest extends AdapterTestCase protected static $dbFile; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!\extension_loaded('pdo_sqlite')) { self::markTestSkipped('Extension pdo_sqlite required.'); @@ -35,7 +35,7 @@ public static function setUpBeforeClass() $pool->createTable(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { @unlink(self::$dbFile); } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php index 8c9b245ce215..573a1b1d0139 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php @@ -24,7 +24,7 @@ class PdoDbalAdapterTest extends AdapterTestCase protected static $dbFile; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!\extension_loaded('pdo_sqlite')) { self::markTestSkipped('Extension pdo_sqlite required.'); @@ -35,7 +35,7 @@ public static function setUpBeforeClass() $pool = new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { @unlink(self::$dbFile); } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php index 615a3e87664b..c4055fb74744 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php @@ -58,12 +58,12 @@ class PhpArrayAdapterTest extends AdapterTestCase protected static $file; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php'; } - protected function tearDown() + protected function tearDown(): void { if (file_exists(sys_get_temp_dir().'/symfony-cache')) { FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php index 4bdd7580fc55..d8e20179883d 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php @@ -30,12 +30,12 @@ class PhpArrayAdapterWithFallbackTest extends AdapterTestCase protected static $file; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php'; } - protected function tearDown() + protected function tearDown(): void { if (file_exists(sys_get_temp_dir().'/symfony-cache')) { FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php index 2d5ddf20b741..dec63a62a0dc 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php @@ -28,7 +28,7 @@ public function createCachePool() return new PhpFilesAdapter('sf-cache'); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php index 95353e496e94..6fa53b01ad53 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php @@ -16,7 +16,7 @@ class PredisAdapterTest extends AbstractRedisAdapterTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setupBeforeClass(); self::$redis = new \Predis\Client(['host' => getenv('REDIS_HOST')]); diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php index cd0dfb7a5909..21f18a0db24b 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php @@ -13,13 +13,13 @@ class PredisClusterAdapterTest extends AbstractRedisAdapterTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setupBeforeClass(); self::$redis = new \Predis\Client([['host' => getenv('REDIS_HOST')]]); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { self::$redis = null; } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PredisRedisClusterAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PredisRedisClusterAdapterTest.php index 2e69cf9c008c..52a515d4df7d 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PredisRedisClusterAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PredisRedisClusterAdapterTest.php @@ -15,7 +15,7 @@ class PredisRedisClusterAdapterTest extends AbstractRedisAdapterTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!$hosts = getenv('REDIS_CLUSTER_HOSTS')) { self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.'); @@ -24,7 +24,7 @@ public static function setUpBeforeClass() self::$redis = RedisAdapter::createConnection('redis:?host['.str_replace(' ', ']&host[', $hosts).']', ['class' => \Predis\Client::class, 'redis_cluster' => true]); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { self::$redis = null; } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php index 871dd2d90cb1..d0480c389354 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php @@ -17,7 +17,7 @@ class RedisAdapterTest extends AbstractRedisAdapterTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setupBeforeClass(); self::$redis = AbstractAdapter::createConnection('redis://'.getenv('REDIS_HOST'), ['lazy' => true]); diff --git a/src/Symfony/Component/Cache/Tests/Adapter/RedisArrayAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/RedisArrayAdapterTest.php index bd9def326dd3..63ade368f7fa 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/RedisArrayAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/RedisArrayAdapterTest.php @@ -13,7 +13,7 @@ class RedisArrayAdapterTest extends AbstractRedisAdapterTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setupBeforeClass(); if (!class_exists('RedisArray')) { diff --git a/src/Symfony/Component/Cache/Tests/Adapter/RedisClusterAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/RedisClusterAdapterTest.php index 4a6db26b6737..34dfae19de36 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/RedisClusterAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/RedisClusterAdapterTest.php @@ -17,7 +17,7 @@ class RedisClusterAdapterTest extends AbstractRedisAdapterTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!class_exists('RedisCluster')) { self::markTestSkipped('The RedisCluster class is required.'); diff --git a/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php index 5e33383c6458..490e50339a32 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php @@ -29,7 +29,7 @@ public function createCachePool($defaultLifetime = 0) return new TagAwareAdapter(new FilesystemAdapter('', $defaultLifetime)); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); } diff --git a/src/Symfony/Component/Cache/Tests/Simple/AbstractRedisCacheTest.php b/src/Symfony/Component/Cache/Tests/Simple/AbstractRedisCacheTest.php index fe53458448ed..81718970c419 100644 --- a/src/Symfony/Component/Cache/Tests/Simple/AbstractRedisCacheTest.php +++ b/src/Symfony/Component/Cache/Tests/Simple/AbstractRedisCacheTest.php @@ -31,7 +31,7 @@ public function createSimpleCache($defaultLifetime = 0) return new RedisCache(self::$redis, str_replace('\\', '.', __CLASS__), $defaultLifetime); } - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!\extension_loaded('redis')) { self::markTestSkipped('Extension redis required.'); @@ -42,7 +42,7 @@ public static function setUpBeforeClass() } } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { self::$redis = null; } diff --git a/src/Symfony/Component/Cache/Tests/Simple/CacheTestCase.php b/src/Symfony/Component/Cache/Tests/Simple/CacheTestCase.php index d4b3d07f6272..d23a0ff84eda 100644 --- a/src/Symfony/Component/Cache/Tests/Simple/CacheTestCase.php +++ b/src/Symfony/Component/Cache/Tests/Simple/CacheTestCase.php @@ -17,7 +17,7 @@ abstract class CacheTestCase extends SimpleCacheTest { - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTest.php b/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTest.php index 6bb206efc6fc..3a7b27b6c08f 100644 --- a/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTest.php +++ b/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTest.php @@ -27,7 +27,7 @@ class MemcachedCacheTest extends CacheTestCase protected static $client; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!MemcachedCache::isSupported()) { self::markTestSkipped('Extension memcached >=2.2.0 required.'); diff --git a/src/Symfony/Component/Cache/Tests/Simple/PdoCacheTest.php b/src/Symfony/Component/Cache/Tests/Simple/PdoCacheTest.php index 5051abb5add7..c326d387d541 100644 --- a/src/Symfony/Component/Cache/Tests/Simple/PdoCacheTest.php +++ b/src/Symfony/Component/Cache/Tests/Simple/PdoCacheTest.php @@ -24,7 +24,7 @@ class PdoCacheTest extends CacheTestCase protected static $dbFile; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!\extension_loaded('pdo_sqlite')) { self::markTestSkipped('Extension pdo_sqlite required.'); @@ -36,7 +36,7 @@ public static function setUpBeforeClass() $pool->createTable(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { @unlink(self::$dbFile); } diff --git a/src/Symfony/Component/Cache/Tests/Simple/PdoDbalCacheTest.php b/src/Symfony/Component/Cache/Tests/Simple/PdoDbalCacheTest.php index ae701def930f..2893fee99615 100644 --- a/src/Symfony/Component/Cache/Tests/Simple/PdoDbalCacheTest.php +++ b/src/Symfony/Component/Cache/Tests/Simple/PdoDbalCacheTest.php @@ -25,7 +25,7 @@ class PdoDbalCacheTest extends CacheTestCase protected static $dbFile; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!\extension_loaded('pdo_sqlite')) { self::markTestSkipped('Extension pdo_sqlite required.'); @@ -37,7 +37,7 @@ public static function setUpBeforeClass() $pool->createTable(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { @unlink(self::$dbFile); } diff --git a/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheTest.php b/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheTest.php index b75c87d2c31f..c1d4ab2d7705 100644 --- a/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheTest.php +++ b/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheTest.php @@ -50,12 +50,12 @@ class PhpArrayCacheTest extends CacheTestCase protected static $file; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php'; } - protected function tearDown() + protected function tearDown(): void { if (file_exists(sys_get_temp_dir().'/symfony-cache')) { FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); diff --git a/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php b/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php index 0a852ef17a62..7ae814a98a0d 100644 --- a/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php +++ b/src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php @@ -37,12 +37,12 @@ class PhpArrayCacheWithFallbackTest extends CacheTestCase protected static $file; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php'; } - protected function tearDown() + protected function tearDown(): void { if (file_exists(sys_get_temp_dir().'/symfony-cache')) { FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); diff --git a/src/Symfony/Component/Cache/Tests/Simple/RedisArrayCacheTest.php b/src/Symfony/Component/Cache/Tests/Simple/RedisArrayCacheTest.php index 37d8e69c6b38..834b6206ac92 100644 --- a/src/Symfony/Component/Cache/Tests/Simple/RedisArrayCacheTest.php +++ b/src/Symfony/Component/Cache/Tests/Simple/RedisArrayCacheTest.php @@ -16,7 +16,7 @@ */ class RedisArrayCacheTest extends AbstractRedisCacheTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setupBeforeClass(); if (!class_exists('RedisArray')) { diff --git a/src/Symfony/Component/Cache/Tests/Simple/RedisCacheTest.php b/src/Symfony/Component/Cache/Tests/Simple/RedisCacheTest.php index 38f31e1ee620..b5792f3971c1 100644 --- a/src/Symfony/Component/Cache/Tests/Simple/RedisCacheTest.php +++ b/src/Symfony/Component/Cache/Tests/Simple/RedisCacheTest.php @@ -18,7 +18,7 @@ */ class RedisCacheTest extends AbstractRedisCacheTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setupBeforeClass(); self::$redis = RedisCache::createConnection('redis://'.getenv('REDIS_HOST')); diff --git a/src/Symfony/Component/Cache/Tests/Simple/RedisClusterCacheTest.php b/src/Symfony/Component/Cache/Tests/Simple/RedisClusterCacheTest.php index 3617bc2722bc..c5115c7c7069 100644 --- a/src/Symfony/Component/Cache/Tests/Simple/RedisClusterCacheTest.php +++ b/src/Symfony/Component/Cache/Tests/Simple/RedisClusterCacheTest.php @@ -16,7 +16,7 @@ */ class RedisClusterCacheTest extends AbstractRedisCacheTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!class_exists('RedisCluster')) { self::markTestSkipped('The RedisCluster class is required.'); diff --git a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php index d0b70899b513..946c66fd1d83 100644 --- a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php +++ b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php @@ -19,12 +19,12 @@ class ConfigCacheTest extends TestCase { private $cacheFile = null; - protected function setUp() + protected function setUp(): void { $this->cacheFile = tempnam(sys_get_temp_dir(), 'config_'); } - protected function tearDown() + protected function tearDown(): void { $files = [$this->cacheFile, $this->cacheFile.'.meta']; diff --git a/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php index 69f781c2e980..90b70cc7249e 100644 --- a/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php @@ -18,7 +18,7 @@ class DirectoryResourceTest extends TestCase { protected $directory; - protected function setUp() + protected function setUp(): void { $this->directory = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'symfonyDirectoryIterator'; if (!file_exists($this->directory)) { @@ -27,7 +27,7 @@ protected function setUp() touch($this->directory.'/tmp.xml'); } - protected function tearDown() + protected function tearDown(): void { if (!is_dir($this->directory)) { return; diff --git a/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php index 433f65e8203d..6b43a58bdabb 100644 --- a/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php @@ -20,14 +20,14 @@ class FileExistenceResourceTest extends TestCase protected $file; protected $time; - protected function setUp() + protected function setUp(): void { $this->file = realpath(sys_get_temp_dir()).'/tmp.xml'; $this->time = time(); $this->resource = new FileExistenceResource($this->file); } - protected function tearDown() + protected function tearDown(): void { if (file_exists($this->file)) { unlink($this->file); diff --git a/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php index bf9e6f3155b7..864604bb5b38 100644 --- a/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php @@ -20,7 +20,7 @@ class FileResourceTest extends TestCase protected $file; protected $time; - protected function setUp() + protected function setUp(): void { $this->file = sys_get_temp_dir().'/tmp.xml'; $this->time = time(); @@ -28,7 +28,7 @@ protected function setUp() $this->resource = new FileResource($this->file); } - protected function tearDown() + protected function tearDown(): void { if (!file_exists($this->file)) { return; diff --git a/src/Symfony/Component/Config/Tests/Resource/GlobResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/GlobResourceTest.php index 5e0b248002d2..629054461aca 100644 --- a/src/Symfony/Component/Config/Tests/Resource/GlobResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/GlobResourceTest.php @@ -16,7 +16,7 @@ class GlobResourceTest extends TestCase { - protected function tearDown() + protected function tearDown(): void { $dir = \dirname(__DIR__).'/Fixtures'; @rmdir($dir.'/TmpGlob'); diff --git a/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php b/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php index a2c2eeb811b2..a7498760a8a3 100644 --- a/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php +++ b/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php @@ -20,12 +20,12 @@ class ResourceCheckerConfigCacheTest extends TestCase { private $cacheFile = null; - protected function setUp() + protected function setUp(): void { $this->cacheFile = tempnam(sys_get_temp_dir(), 'config_'); } - protected function tearDown() + protected function tearDown(): void { $files = [$this->cacheFile, "{$this->cacheFile}.meta"]; diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php index 6f3d7bba44da..ad08aa2e3460 100644 --- a/src/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php @@ -43,12 +43,12 @@ class ApplicationTest extends TestCase private $colSize; - protected function setUp() + protected function setUp(): void { $this->colSize = getenv('COLUMNS'); } - protected function tearDown() + protected function tearDown(): void { putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); putenv('SHELL_VERBOSITY'); @@ -56,7 +56,7 @@ protected function tearDown() unset($_SERVER['SHELL_VERBOSITY']); } - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = realpath(__DIR__.'/Fixtures/'); require_once self::$fixturesPath.'/FooCommand.php'; diff --git a/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/src/Symfony/Component/Console/Tests/Command/CommandTest.php index 9ca4912f882f..0c84d4175b44 100644 --- a/src/Symfony/Component/Console/Tests/Command/CommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/CommandTest.php @@ -28,7 +28,7 @@ class CommandTest extends TestCase { protected static $fixturesPath; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = __DIR__.'/../Fixtures/'; require_once self::$fixturesPath.'/TestCommand.php'; diff --git a/src/Symfony/Component/Console/Tests/Command/LockableTraitTest.php b/src/Symfony/Component/Console/Tests/Command/LockableTraitTest.php index 94b0819bbf42..3dceb361f3ef 100644 --- a/src/Symfony/Component/Console/Tests/Command/LockableTraitTest.php +++ b/src/Symfony/Component/Console/Tests/Command/LockableTraitTest.php @@ -21,7 +21,7 @@ class LockableTraitTest extends TestCase { protected static $fixturesPath; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = __DIR__.'/../Fixtures/'; require_once self::$fixturesPath.'/FooLockCommand.php'; diff --git a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php index 2dcd51f7b18c..f8bcc9d7dba6 100644 --- a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php @@ -25,13 +25,13 @@ class ProgressBarTest extends TestCase { private $colSize; - protected function setUp() + protected function setUp(): void { $this->colSize = getenv('COLUMNS'); putenv('COLUMNS=120'); } - protected function tearDown() + protected function tearDown(): void { putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); } diff --git a/src/Symfony/Component/Console/Tests/Helper/TableTest.php b/src/Symfony/Component/Console/Tests/Helper/TableTest.php index 1497e866a96c..a3c2d30b7934 100644 --- a/src/Symfony/Component/Console/Tests/Helper/TableTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/TableTest.php @@ -24,12 +24,12 @@ class TableTest extends TestCase { protected $stream; - protected function setUp() + protected function setUp(): void { $this->stream = fopen('php://memory', 'r+'); } - protected function tearDown() + protected function tearDown(): void { fclose($this->stream); $this->stream = null; diff --git a/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php b/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php index 4d2a39218c04..a652671c3785 100644 --- a/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php +++ b/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php @@ -25,7 +25,7 @@ class InputDefinitionTest extends TestCase protected $foo1; protected $foo2; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixtures = __DIR__.'/../Fixtures/'; } diff --git a/src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php b/src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php index d843fa4a4559..df4e3384ab8c 100644 --- a/src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php +++ b/src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php @@ -19,12 +19,12 @@ class StreamOutputTest extends TestCase { protected $stream; - protected function setUp() + protected function setUp(): void { $this->stream = fopen('php://memory', 'a', false); } - protected function tearDown() + protected function tearDown(): void { $this->stream = null; } diff --git a/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php b/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php index 88d00c8a9926..943b94172a60 100644 --- a/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php +++ b/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php @@ -28,7 +28,7 @@ class SymfonyStyleTest extends TestCase protected $tester; private $colSize; - protected function setUp() + protected function setUp(): void { $this->colSize = getenv('COLUMNS'); putenv('COLUMNS=121'); @@ -36,7 +36,7 @@ protected function setUp() $this->tester = new CommandTester($this->command); } - protected function tearDown() + protected function tearDown(): void { putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); $this->command = null; diff --git a/src/Symfony/Component/Console/Tests/TerminalTest.php b/src/Symfony/Component/Console/Tests/TerminalTest.php index 93b8c44a7815..3ec92a1dd2d7 100644 --- a/src/Symfony/Component/Console/Tests/TerminalTest.php +++ b/src/Symfony/Component/Console/Tests/TerminalTest.php @@ -19,13 +19,13 @@ class TerminalTest extends TestCase private $colSize; private $lineSize; - protected function setUp() + protected function setUp(): void { $this->colSize = getenv('COLUMNS'); $this->lineSize = getenv('LINES'); } - protected function tearDown() + protected function tearDown(): void { putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); putenv($this->lineSize ? 'LINES' : 'LINES='.$this->lineSize); diff --git a/src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php b/src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php index 7522731535b0..8361602dd7e9 100644 --- a/src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php +++ b/src/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php @@ -23,7 +23,7 @@ class ApplicationTesterTest extends TestCase protected $application; protected $tester; - protected function setUp() + protected function setUp(): void { $this->application = new Application(); $this->application->setAutoExit(false); @@ -38,7 +38,7 @@ protected function setUp() $this->tester->run(['command' => 'foo', 'foo' => 'bar'], ['interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); } - protected function tearDown() + protected function tearDown(): void { $this->application = null; $this->tester = null; diff --git a/src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php b/src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php index 5943591e9aa2..e8a92c729778 100644 --- a/src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php +++ b/src/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php @@ -27,7 +27,7 @@ class CommandTesterTest extends TestCase protected $command; protected $tester; - protected function setUp() + protected function setUp(): void { $this->command = new Command('foo'); $this->command->addArgument('command'); @@ -38,7 +38,7 @@ protected function setUp() $this->tester->execute(['foo' => 'bar'], ['interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); } - protected function tearDown() + protected function tearDown(): void { $this->command = null; $this->tester = null; diff --git a/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php b/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php index 840e59fb5d8b..bd5a0ec7a4c2 100644 --- a/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php +++ b/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php @@ -23,7 +23,7 @@ class DebugClassLoaderTest extends TestCase private $loader; - protected function setUp() + protected function setUp(): void { $this->errorReporting = error_reporting(E_ALL); $this->loader = new ClassLoader(); @@ -31,7 +31,7 @@ protected function setUp() DebugClassLoader::enable(); } - protected function tearDown() + protected function tearDown(): void { DebugClassLoader::disable(); spl_autoload_unregister([$this->loader, 'loadClass']); diff --git a/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php b/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php index 8d29154d855b..03ba15fe6e85 100644 --- a/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php @@ -21,12 +21,12 @@ class ExceptionHandlerTest extends TestCase { - protected function setUp() + protected function setUp(): void { testHeader(); } - protected function tearDown() + protected function tearDown(): void { testHeader(); } diff --git a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php index 9a56b3b4ec8f..7287fa7735ee 100644 --- a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php @@ -19,7 +19,7 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { foreach (spl_autoload_functions() as $function) { if (!\is_array($function)) { diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ExtensionCompilerPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ExtensionCompilerPassTest.php index 810fbe48a573..034841e8036f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ExtensionCompilerPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ExtensionCompilerPassTest.php @@ -25,7 +25,7 @@ class ExtensionCompilerPassTest extends TestCase private $container; private $pass; - protected function setUp() + protected function setUp(): void { $this->container = new ContainerBuilder(); $this->pass = new ExtensionCompilerPass(); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php index 5aa6471751f2..a81634d9d9e7 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php @@ -21,7 +21,7 @@ class ResolveParameterPlaceHoldersPassTest extends TestCase private $container; private $fooDefinition; - protected function setUp() + protected function setUp(): void { $this->compilerPass = new ResolveParameterPlaceHoldersPass(); $this->container = $this->createContainerBuilder(); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php b/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php index 51af451c160c..41ac029f2d69 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php @@ -29,7 +29,7 @@ class ContainerParametersResourceCheckerTest extends TestCase /** @var ContainerInterface */ private $container; - protected function setUp() + protected function setUp(): void { $this->resource = new ContainerParametersResource(['locales' => ['fr', 'en'], 'default_locale' => 'fr']); $this->container = $this->getMockBuilder(ContainerInterface::class)->getMock(); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceTest.php b/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceTest.php index e177ac16b80f..a5591589097f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceTest.php @@ -19,7 +19,7 @@ class ContainerParametersResourceTest extends TestCase /** @var ContainerParametersResource */ private $resource; - protected function setUp() + protected function setUp(): void { $this->resource = new ContainerParametersResource(['locales' => ['fr', 'en'], 'default_locale' => 'fr']); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php b/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php index 12e9ebe422a8..2b0a1301697a 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php @@ -19,7 +19,7 @@ class CrossCheckTest extends TestCase { protected static $fixturesPath; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = __DIR__.'/Fixtures/'; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php index ea11c7c533a3..7171672b1722 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php @@ -21,7 +21,7 @@ class GraphvizDumperTest extends TestCase { protected static $fixturesPath; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = __DIR__.'/../Fixtures/'; } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index 0b20729f1a7a..2cf47e66a2ab 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -48,7 +48,7 @@ class PhpDumperTest extends TestCase { protected static $fixturesPath; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php index cc80a69455b9..e6eaf8f5a970 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php @@ -25,7 +25,7 @@ class XmlDumperTest extends TestCase { protected static $fixturesPath; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php index 72901c855e41..ca41a5b33927 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php @@ -28,7 +28,7 @@ class YamlDumperTest extends TestCase { protected static $fixturesPath; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/DirectoryLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/DirectoryLoaderTest.php index b4f969a0efa0..1029d84c0a62 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/DirectoryLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/DirectoryLoaderTest.php @@ -27,12 +27,12 @@ class DirectoryLoaderTest extends TestCase private $container; private $loader; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } - protected function setUp() + protected function setUp(): void { $locator = new FileLocator(self::$fixturesPath); $this->container = new ContainerBuilder(); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php index 0a8085de0e23..36aabdcb97f1 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php @@ -37,7 +37,7 @@ class FileLoaderTest extends TestCase { protected static $fixturesPath; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = realpath(__DIR__.'/../'); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php index 9db51e1c3538..4b08d059b320 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php @@ -21,7 +21,7 @@ class IniFileLoaderTest extends TestCase protected $container; protected $loader; - protected function setUp() + protected function setUp(): void { $this->container = new ContainerBuilder(); $this->loader = new IniFileLoader($this->container, new FileLocator(realpath(__DIR__.'/../Fixtures/').'/ini')); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php index 9167e18cedca..cfd8aa3cf69f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php @@ -28,7 +28,7 @@ class LoaderResolverTest extends TestCase /** @var LoaderResolver */ private $resolver; - protected function setUp() + protected function setUp(): void { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php index 0718c8ebef13..dafa0464edd2 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php @@ -38,7 +38,7 @@ class XmlFileLoaderTest extends TestCase { protected static $fixturesPath; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); require_once self::$fixturesPath.'/includes/foo.php'; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php index e32fbc2abc2c..80e3818908c8 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php @@ -39,7 +39,7 @@ class YamlFileLoaderTest extends TestCase { protected static $fixturesPath; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); require_once self::$fixturesPath.'/includes/foo.php'; diff --git a/src/Symfony/Component/DomCrawler/Tests/FormTest.php b/src/Symfony/Component/DomCrawler/Tests/FormTest.php index 504a9bd4251d..97ae46fe027f 100644 --- a/src/Symfony/Component/DomCrawler/Tests/FormTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/FormTest.php @@ -17,7 +17,7 @@ class FormTest extends TestCase { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { // Ensure that the private helper class FormFieldRegistry is loaded class_exists('Symfony\\Component\\DomCrawler\\Form'); diff --git a/src/Symfony/Component/EventDispatcher/Tests/EventTest.php b/src/Symfony/Component/EventDispatcher/Tests/EventTest.php index ca8e945c649c..34ed3ba70ec4 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/EventTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/EventTest.php @@ -28,7 +28,7 @@ class EventTest extends TestCase * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ - protected function setUp() + protected function setUp(): void { $this->event = new Event(); } @@ -37,7 +37,7 @@ protected function setUp() * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ - protected function tearDown() + protected function tearDown(): void { $this->event = null; } diff --git a/src/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php b/src/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php index f0f0d71f29a0..484e1a5f3e11 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php @@ -29,7 +29,7 @@ class GenericEventTest extends TestCase /** * Prepares the environment before running a test. */ - protected function setUp() + protected function setUp(): void { $this->subject = new \stdClass(); $this->event = new GenericEvent($this->subject, ['name' => 'Event']); @@ -38,7 +38,7 @@ protected function setUp() /** * Cleans up the environment after running a test. */ - protected function tearDown() + protected function tearDown(): void { $this->subject = null; $this->event = null; diff --git a/src/Symfony/Component/EventDispatcher/Tests/ImmutableEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/ImmutableEventDispatcherTest.php index 195490c1473c..7a2b63899961 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/ImmutableEventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/ImmutableEventDispatcherTest.php @@ -31,7 +31,7 @@ class ImmutableEventDispatcherTest extends TestCase */ private $dispatcher; - protected function setUp() + protected function setUp(): void { $this->innerDispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); $this->dispatcher = new ImmutableEventDispatcher($this->innerDispatcher); diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php index 9ab6b1e843ce..eacfbbcd705b 100644 --- a/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php +++ b/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php @@ -23,7 +23,7 @@ class LexerTest extends TestCase */ private $lexer; - protected function setUp() + protected function setUp(): void { $this->lexer = new Lexer(); } diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php index eb6b35ddfd62..90fe7afdf00b 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php @@ -40,7 +40,7 @@ class FilesystemTestCase extends TestCase */ private static $symlinkOnWindows = null; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if ('\\' === \DIRECTORY_SEPARATOR) { self::$linkOnWindows = true; @@ -69,7 +69,7 @@ public static function setUpBeforeClass() } } - protected function setUp() + protected function setUp(): void { $this->umask = umask(0); $this->filesystem = new Filesystem(); @@ -78,7 +78,7 @@ protected function setUp() $this->workspace = realpath($this->workspace); } - protected function tearDown() + protected function tearDown(): void { if (!empty($this->longPathNamesWindows)) { foreach ($this->longPathNamesWindows as $path) { diff --git a/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php b/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php index 4f4ba016a718..b43f900c3b3f 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php @@ -16,7 +16,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase protected static $tmpDir; protected static $files; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$tmpDir = realpath(sys_get_temp_dir()).\DIRECTORY_SEPARATOR.'symfony_finder'; @@ -69,7 +69,7 @@ public static function setUpBeforeClass() touch(self::toAbsolute('test.php'), strtotime('2005-10-15')); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { $paths = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator(self::$tmpDir, \RecursiveDirectoryIterator::SKIP_DOTS), diff --git a/src/Symfony/Component/Form/Tests/AbstractFormTest.php b/src/Symfony/Component/Form/Tests/AbstractFormTest.php index 4dc84e84e28a..34f2b1310745 100644 --- a/src/Symfony/Component/Form/Tests/AbstractFormTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractFormTest.php @@ -34,14 +34,14 @@ abstract class AbstractFormTest extends TestCase */ protected $form; - protected function setUp() + protected function setUp(): void { $this->dispatcher = new EventDispatcher(); $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); $this->form = $this->createForm(); } - protected function tearDown() + protected function tearDown(): void { $this->dispatcher = null; $this->factory = null; diff --git a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php index 8db5fde83fe6..35daa025f029 100644 --- a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php @@ -25,7 +25,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase protected $csrfTokenManager; protected $testableFeatures = []; - protected function setUp() + protected function setUp(): void { if (!\extension_loaded('intl')) { $this->markTestSkipped('Extension intl is required.'); @@ -45,7 +45,7 @@ protected function getExtensions() ]; } - protected function tearDown() + protected function tearDown(): void { $this->csrfTokenManager = null; diff --git a/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php b/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php index f2ee71b3424c..714cc71dc894 100644 --- a/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php @@ -40,7 +40,7 @@ abstract class AbstractRequestHandlerTest extends TestCase protected $serverParams; - protected function setUp() + protected function setUp(): void { $this->serverParams = $this->getMockBuilder('Symfony\Component\Form\Util\ServerParams')->setMethods(['getNormalizedIniPostMaxSize', 'getContentLength'])->getMock(); $this->requestHandler = $this->getRequestHandler(); diff --git a/src/Symfony/Component/Form/Tests/ButtonTest.php b/src/Symfony/Component/Form/Tests/ButtonTest.php index d4ef819fff3d..a69cc10687a7 100644 --- a/src/Symfony/Component/Form/Tests/ButtonTest.php +++ b/src/Symfony/Component/Form/Tests/ButtonTest.php @@ -24,7 +24,7 @@ class ButtonTest extends TestCase private $factory; - protected function setUp() + protected function setUp(): void { $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php index aca967daba16..ea615b559a68 100644 --- a/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php +++ b/src/Symfony/Component/Form/Tests/ChoiceList/AbstractChoiceListTest.php @@ -103,7 +103,7 @@ abstract class AbstractChoiceListTest extends TestCase */ protected $key4; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php index c71fd75bcf7f..d9c4ea16a27b 100644 --- a/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php +++ b/src/Symfony/Component/Form/Tests/ChoiceList/ArrayChoiceListTest.php @@ -20,7 +20,7 @@ class ArrayChoiceListTest extends AbstractChoiceListTest { private $object; - protected function setUp() + protected function setUp(): void { $this->object = new \stdClass(); diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php index b194d65eeea2..dcddc0298d6f 100644 --- a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php +++ b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php @@ -30,7 +30,7 @@ class CachingFactoryDecoratorTest extends TestCase */ private $factory; - protected function setUp() + protected function setUp(): void { $this->decoratedFactory = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface')->getMock(); $this->factory = new CachingFactoryDecorator($this->decoratedFactory); diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php index b06571805411..6282007195b4 100644 --- a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php +++ b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php @@ -89,7 +89,7 @@ public function getGroupAsObject($object) : new DefaultChoiceListFactoryTest_Castable('Group 2'); } - protected function setUp() + protected function setUp(): void { $this->obj1 = (object) ['label' => 'A', 'index' => 'w', 'value' => 'a', 'preferred' => false, 'group' => 'Group 1', 'attr' => []]; $this->obj2 = (object) ['label' => 'B', 'index' => 'x', 'value' => 'b', 'preferred' => true, 'group' => 'Group 1', 'attr' => ['attr1' => 'value1']]; diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php index 9a8bc42ba674..87b8c87fc58e 100644 --- a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php +++ b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php @@ -31,7 +31,7 @@ class PropertyAccessDecoratorTest extends TestCase */ private $factory; - protected function setUp() + protected function setUp(): void { $this->decoratedFactory = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface')->getMock(); $this->factory = new PropertyAccessDecorator($this->decoratedFactory); diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/LazyChoiceListTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/LazyChoiceListTest.php index 4fc6ff7f0d23..0e822d50ee43 100644 --- a/src/Symfony/Component/Form/Tests/ChoiceList/LazyChoiceListTest.php +++ b/src/Symfony/Component/Form/Tests/ChoiceList/LazyChoiceListTest.php @@ -37,7 +37,7 @@ class LazyChoiceListTest extends TestCase private $value; - protected function setUp() + protected function setUp(): void { $this->loadedList = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\ChoiceListInterface')->getMock(); $this->loader = $this->getMockBuilder('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface')->getMock(); diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php index 362783c91e8e..db3dcb9f3f5f 100644 --- a/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php +++ b/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php @@ -45,7 +45,7 @@ class CallbackChoiceLoaderTest extends TestCase */ private static $lazyChoiceList; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$loader = new CallbackChoiceLoader(function () { return self::$choices; @@ -91,7 +91,7 @@ public function testLoadValuesForChoicesLoadsChoiceListOnFirstCall() ); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { self::$loader = null; self::$value = null; diff --git a/src/Symfony/Component/Form/Tests/Console/Descriptor/JsonDescriptorTest.php b/src/Symfony/Component/Form/Tests/Console/Descriptor/JsonDescriptorTest.php index fb339f6b475e..5926fe527738 100644 --- a/src/Symfony/Component/Form/Tests/Console/Descriptor/JsonDescriptorTest.php +++ b/src/Symfony/Component/Form/Tests/Console/Descriptor/JsonDescriptorTest.php @@ -15,12 +15,12 @@ class JsonDescriptorTest extends AbstractDescriptorTest { - protected function setUp() + protected function setUp(): void { putenv('COLUMNS=121'); } - protected function tearDown() + protected function tearDown(): void { putenv('COLUMNS'); } diff --git a/src/Symfony/Component/Form/Tests/Console/Descriptor/TextDescriptorTest.php b/src/Symfony/Component/Form/Tests/Console/Descriptor/TextDescriptorTest.php index 053f7e451234..ed1582e6b21b 100644 --- a/src/Symfony/Component/Form/Tests/Console/Descriptor/TextDescriptorTest.php +++ b/src/Symfony/Component/Form/Tests/Console/Descriptor/TextDescriptorTest.php @@ -15,12 +15,12 @@ class TextDescriptorTest extends AbstractDescriptorTest { - protected function setUp() + protected function setUp(): void { putenv('COLUMNS=121'); } - protected function tearDown() + protected function tearDown(): void { putenv('COLUMNS'); } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php index da351295c381..ffabfadb74b3 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php @@ -38,7 +38,7 @@ class PropertyPathMapperTest extends TestCase */ private $propertyAccessor; - protected function setUp() + protected function setUp(): void { $this->dispatcher = new EventDispatcher(); $this->propertyAccessor = PropertyAccess::createPropertyAccessor(); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php index fbcec854b28f..23246c4e3db7 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php @@ -18,7 +18,7 @@ class ArrayToPartsTransformerTest extends TestCase { private $transformer; - protected function setUp() + protected function setUp(): void { $this->transformer = new ArrayToPartsTransformer([ 'first' => ['a', 'b', 'c'], @@ -26,7 +26,7 @@ protected function setUp() ]); } - protected function tearDown() + protected function tearDown(): void { $this->transformer = null; } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BooleanToStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BooleanToStringTransformerTest.php index d168ce869579..3694e49f4292 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BooleanToStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BooleanToStringTransformerTest.php @@ -23,12 +23,12 @@ class BooleanToStringTransformerTest extends TestCase */ protected $transformer; - protected function setUp() + protected function setUp(): void { $this->transformer = new BooleanToStringTransformer(self::TRUE_VALUE); } - protected function tearDown() + protected function tearDown(): void { $this->transformer = null; } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php index bdb7bb8f1628..8d812ab37163 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php @@ -20,7 +20,7 @@ class ChoiceToValueTransformerTest extends TestCase protected $transformer; protected $transformerWithNull; - protected function setUp() + protected function setUp(): void { $list = new ArrayChoiceList(['', false, 'X', true]); $listWithNull = new ArrayChoiceList(['', false, 'X', null]); @@ -29,7 +29,7 @@ protected function setUp() $this->transformerWithNull = new ChoiceToValueTransformer($listWithNull); } - protected function tearDown() + protected function tearDown(): void { $this->transformer = null; $this->transformerWithNull = null; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php index 76f9d1a7e5a5..40a242ff8e0d 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php @@ -20,7 +20,7 @@ class ChoicesToValuesTransformerTest extends TestCase protected $transformer; protected $transformerWithNull; - protected function setUp() + protected function setUp(): void { $list = new ArrayChoiceList(['', false, 'X']); $listWithNull = new ArrayChoiceList(['', false, 'X', null]); @@ -29,7 +29,7 @@ protected function setUp() $this->transformerWithNull = new ChoicesToValuesTransformer($listWithNull); } - protected function tearDown() + protected function tearDown(): void { $this->transformer = null; $this->transformerWithNull = null; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php index f5ffab897bd4..309a5dc4e3f4 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php @@ -23,7 +23,7 @@ class DateTimeToLocalizedStringTransformerTest extends TestCase protected $dateTime; protected $dateTimeWithoutSeconds; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -36,7 +36,7 @@ protected function setUp() $this->dateTimeWithoutSeconds = new \DateTime('2010-02-03 04:05:00 UTC'); } - protected function tearDown() + protected function tearDown(): void { $this->dateTime = null; $this->dateTimeWithoutSeconds = null; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php index 335d8d90a987..e2944a937094 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php @@ -22,7 +22,7 @@ class DateTimeToRfc3339TransformerTest extends TestCase protected $dateTime; protected $dateTimeWithoutSeconds; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -30,7 +30,7 @@ protected function setUp() $this->dateTimeWithoutSeconds = new \DateTime('2010-02-03 04:05:00 UTC'); } - protected function tearDown() + protected function tearDown(): void { $this->dateTime = null; $this->dateTimeWithoutSeconds = null; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php index 37e2fadb5635..eacf1d971b90 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php @@ -19,13 +19,13 @@ class IntegerToLocalizedStringTransformerTest extends TestCase { private $defaultLocale; - protected function setUp() + protected function setUp(): void { $this->defaultLocale = \Locale::getDefault(); \Locale::setDefault('en'); } - protected function tearDown() + protected function tearDown(): void { \Locale::setDefault($this->defaultLocale); } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php index ee27e2d72eee..f175a3428741 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php @@ -19,12 +19,12 @@ class MoneyToLocalizedStringTransformerTest extends TestCase { private $previousLocale; - protected function setUp() + protected function setUp(): void { $this->previousLocale = setlocale(LC_ALL, '0'); } - protected function tearDown() + protected function tearDown(): void { setlocale(LC_ALL, $this->previousLocale); } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php index 30b93c66feb5..cb3f5d890ed1 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php @@ -19,13 +19,13 @@ class NumberToLocalizedStringTransformerTest extends TestCase { private $defaultLocale; - protected function setUp() + protected function setUp(): void { $this->defaultLocale = \Locale::getDefault(); \Locale::setDefault('en'); } - protected function tearDown() + protected function tearDown(): void { \Locale::setDefault($this->defaultLocale); } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php index ba21faa6862c..f0fe4392cf65 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php @@ -19,13 +19,13 @@ class PercentToLocalizedStringTransformerTest extends TestCase { private $defaultLocale; - protected function setUp() + protected function setUp(): void { $this->defaultLocale = \Locale::getDefault(); \Locale::setDefault('en'); } - protected function tearDown() + protected function tearDown(): void { \Locale::setDefault($this->defaultLocale); } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php index 67355058a2bd..ec19ddf92ff3 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php @@ -18,12 +18,12 @@ class ValueToDuplicatesTransformerTest extends TestCase { private $transformer; - protected function setUp() + protected function setUp(): void { $this->transformer = new ValueToDuplicatesTransformer(['a', 'b', 'c']); } - protected function tearDown() + protected function tearDown(): void { $this->transformer = null; } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php index a1021d7122fc..bf7b5c0070d5 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php @@ -19,12 +19,12 @@ abstract class MergeCollectionListenerTest extends TestCase { protected $form; - protected function setUp() + protected function setUp(): void { $this->form = $this->getForm('axes'); } - protected function tearDown() + protected function tearDown(): void { $this->form = null; } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php index 85c65d84e2a1..3411fdb7d5b3 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php @@ -26,7 +26,7 @@ class ResizeFormListenerTest extends TestCase private $factory; private $form; - protected function setUp() + protected function setUp(): void { $this->factory = (new FormFactoryBuilder())->getFormFactory(); $this->form = $this->getBuilder() @@ -35,7 +35,7 @@ protected function setUp() ->getForm(); } - protected function tearDown() + protected function tearDown(): void { $this->factory = null; $this->form = null; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php index 49e23a9f2b9c..b60c4ce14c03 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php @@ -60,7 +60,7 @@ class ChoiceTypeTest extends BaseTypeTest ], ]; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -73,7 +73,7 @@ protected function setUp() ]; } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php index 9cadc9cd745f..ea42bbb98dcc 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php @@ -19,7 +19,7 @@ class CountryTypeTest extends BaseTypeTest { const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CountryType'; - protected function setUp() + protected function setUp(): void { IntlTestHelper::requireIntl($this, false); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php index 7a8c1509ba7e..dc9f460b78f2 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php @@ -19,7 +19,7 @@ class CurrencyTypeTest extends BaseTypeTest { const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CurrencyType'; - protected function setUp() + protected function setUp(): void { IntlTestHelper::requireIntl($this, false); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php index 93935157fe9c..c1690222b808 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php @@ -17,7 +17,7 @@ class DateTimeTypeTest extends BaseTypeTest { const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\DateTimeType'; - protected function setUp() + protected function setUp(): void { \Locale::setDefault('en'); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php index de515af44ac7..62588011da22 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php @@ -22,14 +22,14 @@ class DateTypeTest extends BaseTypeTest private $defaultTimezone; private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->defaultTimezone = date_default_timezone_get(); $this->defaultLocale = \Locale::getDefault(); } - protected function tearDown() + protected function tearDown(): void { date_default_timezone_set($this->defaultTimezone); \Locale::setDefault($this->defaultLocale); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php index c5c7dd9161b7..19c730b35453 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php @@ -17,7 +17,7 @@ class IntegerTypeTest extends BaseTypeTest { const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\IntegerType'; - protected function setUp() + protected function setUp(): void { IntlTestHelper::requireIntl($this, false); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php index 960aef1994b9..e352476eab82 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php @@ -19,7 +19,7 @@ class LanguageTypeTest extends BaseTypeTest { const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\LanguageType'; - protected function setUp() + protected function setUp(): void { IntlTestHelper::requireIntl($this, false); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php index c5ba0da6917d..d5624fb5f29d 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php @@ -19,7 +19,7 @@ class LocaleTypeTest extends BaseTypeTest { const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\LocaleType'; - protected function setUp() + protected function setUp(): void { IntlTestHelper::requireIntl($this, false); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php index 42b796a4e646..8dd08bd7bd68 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php @@ -19,7 +19,7 @@ class MoneyTypeTest extends BaseTypeTest private $defaultLocale; - protected function setUp() + protected function setUp(): void { // we test against different locales, so we need the full // implementation @@ -30,7 +30,7 @@ protected function setUp() $this->defaultLocale = \Locale::getDefault(); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php index 800b8f540476..09a807dcb3d2 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php @@ -19,7 +19,7 @@ class NumberTypeTest extends BaseTypeTest private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -30,7 +30,7 @@ protected function setUp() \Locale::setDefault('de_DE'); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php index 8b4666d6fa5f..267511d88ccd 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php @@ -22,7 +22,7 @@ class RepeatedTypeTest extends BaseTypeTest */ protected $form; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php index 5876b092b9da..37d7594bef66 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php @@ -27,7 +27,7 @@ class CsrfValidationListenerTest extends TestCase protected $tokenManager; protected $form; - protected function setUp() + protected function setUp(): void { $this->dispatcher = new EventDispatcher(); $this->factory = (new FormFactoryBuilder())->getFormFactory(); @@ -37,7 +37,7 @@ protected function setUp() ->getForm(); } - protected function tearDown() + protected function tearDown(): void { $this->dispatcher = null; $this->factory = null; diff --git a/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php b/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php index 94a8f002dfb9..6ed6f4690d8d 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php @@ -43,7 +43,7 @@ class FormTypeCsrfExtensionTest extends TypeTestCase */ protected $translator; - protected function setUp() + protected function setUp(): void { $this->tokenManager = $this->getMockBuilder(CsrfTokenManagerInterface::class)->getMock(); $this->translator = $this->getMockBuilder(TranslatorInterface::class)->getMock(); @@ -51,7 +51,7 @@ protected function setUp() parent::setUp(); } - protected function tearDown() + protected function tearDown(): void { $this->tokenManager = null; $this->translator = null; diff --git a/src/Symfony/Component/Form/Tests/Extension/DataCollector/DataCollectorExtensionTest.php b/src/Symfony/Component/Form/Tests/Extension/DataCollector/DataCollectorExtensionTest.php index d125d463cb50..313827ef4671 100644 --- a/src/Symfony/Component/Form/Tests/Extension/DataCollector/DataCollectorExtensionTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/DataCollector/DataCollectorExtensionTest.php @@ -27,7 +27,7 @@ class DataCollectorExtensionTest extends TestCase */ private $dataCollector; - protected function setUp() + protected function setUp(): void { $this->dataCollector = $this->getMockBuilder('Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface')->getMock(); $this->extension = new DataCollectorExtension($this->dataCollector); diff --git a/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php b/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php index d7c595055edf..82eec8a45cf2 100644 --- a/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php @@ -65,7 +65,7 @@ class FormDataCollectorTest extends TestCase */ private $childView; - protected function setUp() + protected function setUp(): void { $this->dataExtractor = $this->getMockBuilder('Symfony\Component\Form\Extension\DataCollector\FormDataExtractorInterface')->getMock(); $this->dataCollector = new FormDataCollector($this->dataExtractor); diff --git a/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataExtractorTest.php b/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataExtractorTest.php index b00428cbb8c9..0c544c3ebc6c 100644 --- a/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataExtractorTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataExtractorTest.php @@ -45,7 +45,7 @@ class FormDataExtractorTest extends TestCase */ private $factory; - protected function setUp() + protected function setUp(): void { $this->dataExtractor = new FormDataExtractor(); $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); diff --git a/src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/DataCollectorTypeExtensionTest.php b/src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/DataCollectorTypeExtensionTest.php index e6e7732c0a97..97b89849d19e 100644 --- a/src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/DataCollectorTypeExtensionTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/DataCollector/Type/DataCollectorTypeExtensionTest.php @@ -27,7 +27,7 @@ class DataCollectorTypeExtensionTest extends TestCase */ private $dataCollector; - protected function setUp() + protected function setUp(): void { $this->dataCollector = $this->getMockBuilder('Symfony\Component\Form\Extension\DataCollector\FormDataCollectorInterface')->getMock(); $this->extension = new DataCollectorTypeExtension($this->dataCollector); diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php index ce8973d06eef..36965c114db7 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php @@ -48,7 +48,7 @@ class FormValidatorTest extends ConstraintValidatorTestCase */ private $factory; - protected function setUp() + protected function setUp(): void { $this->dispatcher = new EventDispatcher(); $this->factory = (new FormFactoryBuilder())->getFormFactory(); diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php index 76bc07b2ee98..e46859ada862 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php @@ -58,7 +58,7 @@ class ValidationListenerTest extends TestCase private $params; - protected function setUp() + protected function setUp(): void { $this->dispatcher = new EventDispatcher(); $this->factory = (new FormFactoryBuilder())->getFormFactory(); diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php index 878bbfad21bc..81eda91428d5 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php @@ -51,7 +51,7 @@ class ValidatorTypeGuesserTest extends TestCase */ private $metadataFactory; - protected function setUp() + protected function setUp(): void { $this->metadata = new ClassMetadata(self::TEST_CLASS); $this->metadataFactory = new FakeMetadataFactory(); diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php index 2fa3e928926e..bcd9ea420eda 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php @@ -61,7 +61,7 @@ class ViolationMapperTest extends TestCase */ private $params; - protected function setUp() + protected function setUp(): void { $this->dispatcher = new EventDispatcher(); $this->mapper = new ViolationMapper(); diff --git a/src/Symfony/Component/Form/Tests/FormBuilderTest.php b/src/Symfony/Component/Form/Tests/FormBuilderTest.php index 38d29a28d813..d8fa225ac1dd 100644 --- a/src/Symfony/Component/Form/Tests/FormBuilderTest.php +++ b/src/Symfony/Component/Form/Tests/FormBuilderTest.php @@ -24,14 +24,14 @@ class FormBuilderTest extends TestCase private $factory; private $builder; - protected function setUp() + protected function setUp(): void { $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); $this->builder = new FormBuilder('name', null, $this->dispatcher, $this->factory); } - protected function tearDown() + protected function tearDown(): void { $this->dispatcher = null; $this->factory = null; diff --git a/src/Symfony/Component/Form/Tests/FormFactoryBuilderTest.php b/src/Symfony/Component/Form/Tests/FormFactoryBuilderTest.php index 3e66ce8c38be..9a236cc00958 100644 --- a/src/Symfony/Component/Form/Tests/FormFactoryBuilderTest.php +++ b/src/Symfony/Component/Form/Tests/FormFactoryBuilderTest.php @@ -21,7 +21,7 @@ class FormFactoryBuilderTest extends TestCase private $guesser; private $type; - protected function setUp() + protected function setUp(): void { $factory = new \ReflectionClass('Symfony\Component\Form\FormFactory'); $this->registry = $factory->getProperty('registry'); diff --git a/src/Symfony/Component/Form/Tests/FormFactoryTest.php b/src/Symfony/Component/Form/Tests/FormFactoryTest.php index ddd5b4bb72e4..c756c0d90f55 100644 --- a/src/Symfony/Component/Form/Tests/FormFactoryTest.php +++ b/src/Symfony/Component/Form/Tests/FormFactoryTest.php @@ -49,7 +49,7 @@ class FormFactoryTest extends TestCase */ private $factory; - protected function setUp() + protected function setUp(): void { $this->guesser1 = $this->getMockBuilder('Symfony\Component\Form\FormTypeGuesserInterface')->getMock(); $this->guesser2 = $this->getMockBuilder('Symfony\Component\Form\FormTypeGuesserInterface')->getMock(); diff --git a/src/Symfony/Component/Form/Tests/FormRegistryTest.php b/src/Symfony/Component/Form/Tests/FormRegistryTest.php index d027a564408b..66ac0015c842 100644 --- a/src/Symfony/Component/Form/Tests/FormRegistryTest.php +++ b/src/Symfony/Component/Form/Tests/FormRegistryTest.php @@ -62,7 +62,7 @@ class FormRegistryTest extends TestCase */ private $extension2; - protected function setUp() + protected function setUp(): void { $this->resolvedTypeFactory = $this->getMockBuilder('Symfony\Component\Form\ResolvedFormTypeFactory')->getMock(); $this->guesser1 = $this->getMockBuilder('Symfony\Component\Form\FormTypeGuesserInterface')->getMock(); diff --git a/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php b/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php index 66f7a21f4a7c..bff9852bbbd8 100644 --- a/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php +++ b/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php @@ -20,12 +20,12 @@ class NativeRequestHandlerTest extends AbstractRequestHandlerTest { private static $serverBackup; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$serverBackup = $_SERVER; } - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -38,7 +38,7 @@ protected function setUp() ]; } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php b/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php index 19b15e0c9fae..210b6657aa14 100644 --- a/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php +++ b/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php @@ -70,7 +70,7 @@ class ResolvedFormTypeTest extends TestCase */ private $resolvedType; - protected function setUp() + protected function setUp(): void { $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); $this->factory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock(); diff --git a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php index ab527b699905..b90144809c62 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php @@ -355,7 +355,7 @@ protected function provideResponse() return new BinaryFileResponse(__DIR__.'/../README.md', 200, ['Content-Type' => 'application/octet-stream']); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { $path = __DIR__.'/../Fixtures/to_delete'; if (file_exists($path)) { diff --git a/src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php index f990a4f3b57b..a43ce819fb1c 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php @@ -78,7 +78,7 @@ public function testGuessWithNonReadablePath() } } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { $path = __DIR__.'/../Fixtures/to_delete'; if (file_exists($path)) { diff --git a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php index dbe875ea8fd5..0662c0e770c1 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php @@ -24,7 +24,7 @@ class UploadedFileTest extends TestCase { - protected function setUp() + protected function setUp(): void { if (!ini_get('file_uploads')) { $this->markTestSkipped('file_uploads is disabled in php.ini'); diff --git a/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php index 041f57fe8644..bde664194b85 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php @@ -160,12 +160,12 @@ protected function createTempFile() return $tempFile; } - protected function setUp() + protected function setUp(): void { mkdir(sys_get_temp_dir().'/form_test', 0777, true); } - protected function tearDown() + protected function tearDown(): void { foreach (glob(sys_get_temp_dir().'/form_test/*') as $file) { unlink($file); diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index 414868925a92..d933432c484d 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -19,7 +19,7 @@ class RequestTest extends TestCase { - protected function tearDown() + protected function tearDown(): void { Request::setTrustedProxies([], -1); Request::setTrustedHosts([]); diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php index 3d3e696c75c3..21a66bbf861e 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php @@ -20,7 +20,7 @@ class ResponseFunctionalTest extends TestCase { private static $server; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { $spec = [ 1 => ['file', '/dev/null', 'w'], @@ -32,7 +32,7 @@ public static function setUpBeforeClass() sleep(1); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { if (self::$server) { proc_terminate(self::$server); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php index 44c8174e3034..6313967afa40 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php @@ -28,7 +28,7 @@ class AttributeBagTest extends TestCase */ private $bag; - protected function setUp() + protected function setUp(): void { $this->array = [ 'hello' => 'world', @@ -49,7 +49,7 @@ protected function setUp() $this->bag->initialize($this->array); } - protected function tearDown() + protected function tearDown(): void { $this->bag = null; $this->array = []; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php index 6b4bb17d696f..3a3251d05b79 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php @@ -28,7 +28,7 @@ class NamespacedAttributeBagTest extends TestCase */ private $bag; - protected function setUp() + protected function setUp(): void { $this->array = [ 'hello' => 'world', @@ -49,7 +49,7 @@ protected function setUp() $this->bag->initialize($this->array); } - protected function tearDown() + protected function tearDown(): void { $this->bag = null; $this->array = []; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php index b4e2c3a5ad30..ba2687199d7b 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php @@ -28,7 +28,7 @@ class AutoExpireFlashBagTest extends TestCase protected $array = []; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->bag = new FlashBag(); @@ -36,7 +36,7 @@ protected function setUp() $this->bag->initialize($this->array); } - protected function tearDown() + protected function tearDown(): void { $this->bag = null; parent::tearDown(); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php index 6d8619e078a1..24dbbfe98f05 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php @@ -28,7 +28,7 @@ class FlashBagTest extends TestCase protected $array = []; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->bag = new FlashBag(); @@ -36,7 +36,7 @@ protected function setUp() $this->bag->initialize($this->array); } - protected function tearDown() + protected function tearDown(): void { $this->bag = null; parent::tearDown(); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php index acb129984edd..e216bfc8c2ee 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php @@ -37,13 +37,13 @@ class SessionTest extends TestCase */ protected $session; - protected function setUp() + protected function setUp(): void { $this->storage = new MockArraySessionStorage(); $this->session = new Session($this->storage, new AttributeBag(), new FlashBag()); } - protected function tearDown() + protected function tearDown(): void { $this->storage = null; $this->session = null; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php index c0651498f272..6a15a06873e2 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php @@ -37,7 +37,7 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase */ abstract protected function createRedisClient(string $host); - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -54,7 +54,7 @@ protected function setUp() ); } - protected function tearDown() + protected function tearDown(): void { $this->redisClient = null; $this->storage = null; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php index f65e62b506d8..b25b68bbb370 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php @@ -17,7 +17,7 @@ class AbstractSessionHandlerTest extends TestCase { private static $server; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { $spec = [ 1 => ['file', '/dev/null', 'w'], @@ -29,7 +29,7 @@ public static function setUpBeforeClass() sleep(1); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { if (self::$server) { proc_terminate(self::$server); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php index 2393ddf18204..e9c17703a717 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php @@ -30,7 +30,7 @@ class MemcachedSessionHandlerTest extends TestCase protected $memcached; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -45,7 +45,7 @@ protected function setUp() ); } - protected function tearDown() + protected function tearDown(): void { $this->memcached = null; $this->storage = null; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php index 455066676f4a..f956fa2760f7 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php @@ -29,7 +29,7 @@ class MongoDbSessionHandlerTest extends TestCase private $storage; public $options; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php index 6d1b65044c8d..d080ce3ca6e5 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -22,7 +22,7 @@ class PdoSessionHandlerTest extends TestCase { private $dbFile; - protected function tearDown() + protected function tearDown(): void { // make sure the temporary database file is deleted when it has been created (even when a test fails) if ($this->dbFile) { diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php index 2c4758b9137c..e040f4862755 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php @@ -28,7 +28,7 @@ class MetadataBagTest extends TestCase protected $array = []; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->bag = new MetadataBag(); @@ -36,7 +36,7 @@ protected function setUp() $this->bag->initialize($this->array); } - protected function tearDown() + protected function tearDown(): void { $this->array = []; $this->bag = null; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php index 7e0d303b98d0..b99e71985bb8 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php @@ -40,7 +40,7 @@ class MockArraySessionStorageTest extends TestCase private $data; - protected function setUp() + protected function setUp(): void { $this->attributes = new AttributeBag(); $this->flashes = new FlashBag(); @@ -56,7 +56,7 @@ protected function setUp() $this->storage->setSessionData($this->data); } - protected function tearDown() + protected function tearDown(): void { $this->data = null; $this->flashes = null; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php index 5d2fda84a617..d9314075af70 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php @@ -33,13 +33,13 @@ class MockFileSessionStorageTest extends TestCase */ protected $storage; - protected function setUp() + protected function setUp(): void { $this->sessionDir = sys_get_temp_dir().'/sftest'; $this->storage = $this->getStorage(); } - protected function tearDown() + protected function tearDown(): void { $this->sessionDir = null; $this->storage = null; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php index 8b0072717090..17f46bef5e1a 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -33,7 +33,7 @@ class NativeSessionStorageTest extends TestCase { private $savePath; - protected function setUp() + protected function setUp(): void { $this->iniSet('session.save_handler', 'files'); $this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sftest'); @@ -42,7 +42,7 @@ protected function setUp() } } - protected function tearDown() + protected function tearDown(): void { session_write_close(); array_map('unlink', glob($this->savePath.'/*')); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php index 4332400246b9..7d6827079893 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php @@ -29,7 +29,7 @@ class PhpBridgeSessionStorageTest extends TestCase { private $savePath; - protected function setUp() + protected function setUp(): void { $this->iniSet('session.save_handler', 'files'); $this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sftest'); @@ -38,7 +38,7 @@ protected function setUp() } } - protected function tearDown() + protected function tearDown(): void { session_write_close(); array_map('unlink', glob($this->savePath.'/*')); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php index ae40f2c29b0c..4820a6593b92 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php @@ -27,12 +27,12 @@ class AbstractProxyTest extends TestCase */ protected $proxy; - protected function setUp() + protected function setUp(): void { $this->proxy = $this->getMockForAbstractClass(AbstractProxy::class); } - protected function tearDown() + protected function tearDown(): void { $this->proxy = null; } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php index ec9029c7dac2..540d58a27054 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php @@ -34,13 +34,13 @@ class SessionHandlerProxyTest extends TestCase */ private $proxy; - protected function setUp() + protected function setUp(): void { $this->mock = $this->getMockBuilder('SessionHandlerInterface')->getMock(); $this->proxy = new SessionHandlerProxy($this->mock); } - protected function tearDown() + protected function tearDown(): void { $this->mock = null; $this->proxy = null; diff --git a/src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php b/src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php index 9892db20ea36..b97559e32162 100644 --- a/src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php @@ -18,12 +18,12 @@ class ChainCacheClearerTest extends TestCase { protected static $cacheDir; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf_cache_clearer_dir'); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { @unlink(self::$cacheDir); } diff --git a/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php b/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php index 27e8f9f2aff5..4266c0a1824f 100644 --- a/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php @@ -18,12 +18,12 @@ class CacheWarmerAggregateTest extends TestCase { protected static $cacheDir; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf_cache_warmer_dir'); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { @unlink(self::$cacheDir); } diff --git a/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php b/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php index bee7d67379f6..b5acb1261849 100644 --- a/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php @@ -18,12 +18,12 @@ class CacheWarmerTest extends TestCase { protected static $cacheFile; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$cacheFile = tempnam(sys_get_temp_dir(), 'sf_cache_warmer_dir'); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { @unlink(self::$cacheFile); } diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php index 33b38175ad7f..8ee9108b1bb3 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php @@ -30,7 +30,7 @@ class ArgumentResolverTest extends TestCase /** @var ArgumentResolver */ private static $resolver; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { $factory = new ArgumentMetadataFactory(); diff --git a/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php b/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php index 199d3a0e4b1e..f77b6759afa6 100644 --- a/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php @@ -26,7 +26,7 @@ class ArgumentMetadataFactoryTest extends TestCase */ private $factory; - protected function setUp() + protected function setUp(): void { $this->factory = new ArgumentMetadataFactory(); } diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ServicesResetterTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ServicesResetterTest.php index 86f1abdb0529..5be6026c90a6 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ServicesResetterTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ServicesResetterTest.php @@ -18,7 +18,7 @@ class ServicesResetterTest extends TestCase { - protected function setUp() + protected function setUp(): void { ResettableService::$counter = 0; ClearableService::$counter = 0; diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php index 5bc1ff51ffd4..da8dc6fb0b75 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php @@ -29,12 +29,12 @@ class AddRequestFormatsListenerTest extends TestCase */ private $listener; - protected function setUp() + protected function setUp(): void { $this->listener = new AddRequestFormatsListener(['csv' => ['text/csv', 'text/plain']]); } - protected function tearDown() + protected function tearDown(): void { $this->listener = null; } diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php index 925eb6f20e15..a83b81741b6f 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php @@ -23,7 +23,7 @@ class LocaleListenerTest extends TestCase { private $requestStack; - protected function setUp() + protected function setUp(): void { $this->requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->disableOriginalConstructor()->getMock(); } diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php index fbb2512c535c..1aaa64bc89ce 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php @@ -26,7 +26,7 @@ class ResponseListenerTest extends TestCase private $kernel; - protected function setUp() + protected function setUp(): void { $this->dispatcher = new EventDispatcher(); $listener = new ResponseListener('UTF-8'); @@ -35,7 +35,7 @@ protected function setUp() $this->kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); } - protected function tearDown() + protected function tearDown(): void { $this->dispatcher = null; $this->kernel = null; diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php index 68b00a027c6a..ea88d4b34fa3 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php @@ -31,7 +31,7 @@ class RouterListenerTest extends TestCase { private $requestStack; - protected function setUp() + protected function setUp(): void { $this->requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->disableOriginalConstructor()->getMock(); } diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php index 1f0a6c628b29..1ae3bb38b548 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php @@ -40,7 +40,7 @@ class TestSessionListenerTest extends TestCase */ private $session; - protected function setUp() + protected function setUp(): void { $this->listener = $this->getMockForAbstractClass('Symfony\Component\HttpKernel\EventListener\AbstractTestSessionListener'); $this->session = $this->getSession(); diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/TranslatorListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/TranslatorListenerTest.php index 9a833ce37478..17bf4261f95b 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/TranslatorListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/TranslatorListenerTest.php @@ -28,7 +28,7 @@ class TranslatorListenerTest extends TestCase private $translator; private $requestStack; - protected function setUp() + protected function setUp(): void { $this->translator = $this->getMockBuilder(LocaleAwareInterface::class)->getMock(); $this->requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->getMock(); diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php index 4002aeec9db1..7cec68143bb5 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php @@ -21,7 +21,7 @@ class ValidateRequestListenerTest extends TestCase { - protected function tearDown() + protected function tearDown(): void { Request::setTrustedProxies([], -1); } diff --git a/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php b/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php index 22f0aa44af8e..15e543a21423 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php @@ -23,7 +23,7 @@ class FragmentHandlerTest extends TestCase { private $requestStack; - protected function setUp() + protected function setUp(): void { $this->requestStack = $this->getMockBuilder('Symfony\\Component\\HttpFoundation\\RequestStack') ->disableOriginalConstructor() diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php index fde389c28f3d..a73a327b53d0 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php @@ -35,7 +35,7 @@ class HttpCacheTestCase extends TestCase */ protected $store; - protected function setUp() + protected function setUp(): void { $this->kernel = null; @@ -53,7 +53,7 @@ protected function setUp() $this->clearDirectory(sys_get_temp_dir().'/http_cache'); } - protected function tearDown() + protected function tearDown(): void { if ($this->cache) { $this->cache->getStore()->cleanup(); diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php index fc47ff2c88c5..2887c14f5d57 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php @@ -26,7 +26,7 @@ class StoreTest extends TestCase */ protected $store; - protected function setUp() + protected function setUp(): void { $this->request = Request::create('/'); $this->response = new Response('hello world', 200, []); @@ -36,7 +36,7 @@ protected function setUp() $this->store = new Store(sys_get_temp_dir().'/http_cache'); } - protected function tearDown() + protected function tearDown(): void { $this->store = null; $this->request = null; diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/SubRequestHandlerTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/SubRequestHandlerTest.php index 67b637bfe3d0..61e6beded580 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/SubRequestHandlerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/SubRequestHandlerTest.php @@ -21,12 +21,12 @@ class SubRequestHandlerTest extends TestCase { private static $globalState; - protected function setUp() + protected function setUp(): void { self::$globalState = $this->getGlobalState(); } - protected function tearDown() + protected function tearDown(): void { Request::setTrustedProxies(self::$globalState[0], self::$globalState[1]); } diff --git a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php index 5147d7deeba3..19ade842c3c5 100644 --- a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php @@ -30,7 +30,7 @@ class KernelTest extends TestCase { - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { $fs = new Filesystem(); $fs->remove(__DIR__.'/Fixtures/var'); diff --git a/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php b/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php index 7439ae1376de..79b79cc69cb9 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php @@ -32,13 +32,13 @@ class LoggerTest extends TestCase */ private $tmpFile; - protected function setUp() + protected function setUp(): void { $this->tmpFile = tempnam(sys_get_temp_dir(), 'log'); $this->logger = new Logger(LogLevel::DEBUG, $this->tmpFile); } - protected function tearDown() + protected function tearDown(): void { if (!@unlink($this->tmpFile)) { file_put_contents($this->tmpFile, ''); diff --git a/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php b/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php index bf4cd17d16ba..f088fe044db1 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php @@ -20,7 +20,7 @@ class FileProfilerStorageTest extends TestCase private $tmpDir; private $storage; - protected function setUp() + protected function setUp(): void { $this->tmpDir = sys_get_temp_dir().'/sf_profiler_file_storage'; if (is_dir($this->tmpDir)) { @@ -30,7 +30,7 @@ protected function setUp() $this->storage->purge(); } - protected function tearDown() + protected function tearDown(): void { self::cleanDir(); } diff --git a/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php b/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php index 35aa8ea5dc53..2128ea9bcd8c 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php @@ -82,7 +82,7 @@ public function testFindWorksWithStatusCode() $this->assertCount(0, $profiler->find(null, null, null, null, null, null, '204')); } - protected function setUp() + protected function setUp(): void { $this->tmp = tempnam(sys_get_temp_dir(), 'sf_profiler'); if (file_exists($this->tmp)) { @@ -93,7 +93,7 @@ protected function setUp() $this->storage->purge(); } - protected function tearDown() + protected function tearDown(): void { if (null !== $this->storage) { $this->storage->purge(); diff --git a/src/Symfony/Component/Intl/Tests/Collator/Verification/CollatorTest.php b/src/Symfony/Component/Intl/Tests/Collator/Verification/CollatorTest.php index 378463cac854..3f06b2c25f10 100644 --- a/src/Symfony/Component/Intl/Tests/Collator/Verification/CollatorTest.php +++ b/src/Symfony/Component/Intl/Tests/Collator/Verification/CollatorTest.php @@ -22,7 +22,7 @@ */ class CollatorTest extends AbstractCollatorTest { - protected function setUp() + protected function setUp(): void { IntlTestHelper::requireFullIntl($this, false); diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php index faabdde9311b..968172433faa 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php @@ -62,7 +62,7 @@ class BundleEntryReaderTest extends TestCase 'Foo' => 'Bar', ]; - protected function setUp() + protected function setUp(): void { $this->readerImpl = $this->getMockBuilder('Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface')->getMock(); $this->reader = new BundleEntryReader($this->readerImpl); diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php index 52215e36505f..31f3ff2262aa 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php @@ -25,7 +25,7 @@ class IntlBundleReaderTest extends TestCase */ private $reader; - protected function setUp() + protected function setUp(): void { $this->reader = new IntlBundleReader(); } diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php index 0b701cb92e0d..faf129cd4dad 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php @@ -24,7 +24,7 @@ class JsonBundleReaderTest extends TestCase */ private $reader; - protected function setUp() + protected function setUp(): void { $this->reader = new JsonBundleReader(); } diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php index a2b35594a13d..0cc1001651cb 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php @@ -24,7 +24,7 @@ class PhpBundleReaderTest extends TestCase */ private $reader; - protected function setUp() + protected function setUp(): void { $this->reader = new PhpBundleReader(); } diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php index f56bc84385d8..c0703dd233a0 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php @@ -32,7 +32,7 @@ class JsonBundleWriterTest extends TestCase */ private $filesystem; - protected function setUp() + protected function setUp(): void { $this->writer = new JsonBundleWriter(); $this->directory = sys_get_temp_dir().'/JsonBundleWriterTest/'.mt_rand(1000, 9999); @@ -41,7 +41,7 @@ protected function setUp() $this->filesystem->mkdir($this->directory); } - protected function tearDown() + protected function tearDown(): void { $this->filesystem->remove($this->directory); } diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php index 8010f9574a02..bc0ef87c2b77 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php @@ -32,7 +32,7 @@ class PhpBundleWriterTest extends TestCase */ private $filesystem; - protected function setUp() + protected function setUp(): void { $this->writer = new PhpBundleWriter(); $this->directory = sys_get_temp_dir().'/PhpBundleWriterTest/'.mt_rand(1000, 9999); @@ -41,7 +41,7 @@ protected function setUp() $this->filesystem->mkdir($this->directory); } - protected function tearDown() + protected function tearDown(): void { $this->filesystem->remove($this->directory); } diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/TextBundleWriterTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/TextBundleWriterTest.php index 2c0e70e019ac..6271f9c31480 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/TextBundleWriterTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/TextBundleWriterTest.php @@ -34,7 +34,7 @@ class TextBundleWriterTest extends TestCase */ private $filesystem; - protected function setUp() + protected function setUp(): void { $this->writer = new TextBundleWriter(); $this->directory = sys_get_temp_dir().'/TextBundleWriterTest/'.mt_rand(1000, 9999); @@ -43,7 +43,7 @@ protected function setUp() $this->filesystem->mkdir($this->directory); } - protected function tearDown() + protected function tearDown(): void { $this->filesystem->remove($this->directory); } diff --git a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php index 1ee304251ed7..aadf0c5f059e 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php @@ -593,7 +593,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest protected $dataProvider; private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -605,7 +605,7 @@ protected function setUp() $this->defaultLocale = \Locale::getDefault(); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php index cf3cca8cf256..eed2db8c7572 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php @@ -703,7 +703,7 @@ abstract class AbstractDataProviderTest extends TestCase private static $rootLocales; - protected function setUp() + protected function setUp(): void { \Locale::setDefault('en'); Locale::setDefaultFallback('en'); diff --git a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php index 78045a02a12f..3abeccc725f3 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php @@ -832,7 +832,7 @@ abstract class AbstractLanguageDataProviderTest extends AbstractDataProviderTest protected $dataProvider; private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -844,7 +844,7 @@ protected function setUp() $this->defaultLocale = \Locale::getDefault(); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLocaleDataProviderTest.php b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLocaleDataProviderTest.php index 5e18845654e7..1cc67cff352a 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLocaleDataProviderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLocaleDataProviderTest.php @@ -27,7 +27,7 @@ abstract class AbstractLocaleDataProviderTest extends AbstractDataProviderTest protected $dataProvider; private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -39,7 +39,7 @@ protected function setUp() $this->defaultLocale = \Locale::getDefault(); } - protected function tearDown() + protected function tearDown(): void { \Locale::setDefault($this->defaultLocale); } diff --git a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php index a10173b69b15..2e6139c64844 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractRegionDataProviderTest.php @@ -281,7 +281,7 @@ abstract class AbstractRegionDataProviderTest extends AbstractDataProviderTest protected $dataProvider; private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -293,7 +293,7 @@ protected function setUp() $this->defaultLocale = \Locale::getDefault(); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractScriptDataProviderTest.php b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractScriptDataProviderTest.php index 98cc7e4ab22b..98042148e316 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractScriptDataProviderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractScriptDataProviderTest.php @@ -221,7 +221,7 @@ abstract class AbstractScriptDataProviderTest extends AbstractDataProviderTest protected $dataProvider; private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -233,7 +233,7 @@ protected function setUp() $this->defaultLocale = \Locale::getDefault(); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php b/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php index 03a616a6ab19..0719fd009294 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php @@ -32,7 +32,7 @@ class LocaleScannerTest extends TestCase */ private $scanner; - protected function setUp() + protected function setUp(): void { $this->directory = sys_get_temp_dir().'/LocaleScannerTest/'.mt_rand(1000, 9999); $this->filesystem = new Filesystem(); @@ -62,7 +62,7 @@ protected function setUp() file_put_contents($this->directory.'/fr_child.txt', 'en_GB{%%Parent{"fr"}}'); } - protected function tearDown() + protected function tearDown(): void { $this->filesystem->remove($this->directory); } diff --git a/src/Symfony/Component/Intl/Tests/Data/Util/RingBufferTest.php b/src/Symfony/Component/Intl/Tests/Data/Util/RingBufferTest.php index 0753adad97de..f653503dbfd9 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Util/RingBufferTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Util/RingBufferTest.php @@ -24,7 +24,7 @@ class RingBufferTest extends TestCase */ private $buffer; - protected function setUp() + protected function setUp(): void { $this->buffer = new RingBuffer(2); } diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php index 55245cfeab15..0d7b748ce722 100644 --- a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php @@ -26,7 +26,7 @@ abstract class AbstractIntlDateFormatterTest extends TestCase { private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -34,7 +34,7 @@ protected function setUp() \Locale::setDefault('en'); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/Verification/IntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/Verification/IntlDateFormatterTest.php index 8d5912ca6c9e..863d3409c878 100644 --- a/src/Symfony/Component/Intl/Tests/DateFormatter/Verification/IntlDateFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/DateFormatter/Verification/IntlDateFormatterTest.php @@ -23,7 +23,7 @@ */ class IntlDateFormatterTest extends AbstractIntlDateFormatterTest { - protected function setUp() + protected function setUp(): void { IntlTestHelper::requireFullIntl($this, false); diff --git a/src/Symfony/Component/Intl/Tests/Globals/Verification/IntlGlobalsTest.php b/src/Symfony/Component/Intl/Tests/Globals/Verification/IntlGlobalsTest.php index b5cd1c13c32f..4b390d58c1ea 100644 --- a/src/Symfony/Component/Intl/Tests/Globals/Verification/IntlGlobalsTest.php +++ b/src/Symfony/Component/Intl/Tests/Globals/Verification/IntlGlobalsTest.php @@ -22,7 +22,7 @@ */ class IntlGlobalsTest extends AbstractIntlGlobalsTest { - protected function setUp() + protected function setUp(): void { IntlTestHelper::requireFullIntl($this, false); diff --git a/src/Symfony/Component/Intl/Tests/IntlTest.php b/src/Symfony/Component/Intl/Tests/IntlTest.php index 8fbcda40c08e..5c91a84ca212 100644 --- a/src/Symfony/Component/Intl/Tests/IntlTest.php +++ b/src/Symfony/Component/Intl/Tests/IntlTest.php @@ -18,14 +18,14 @@ class IntlTest extends TestCase { private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->defaultLocale = \Locale::getDefault(); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php b/src/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php index 8738b559bf6e..45c90f6c0f6b 100644 --- a/src/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php +++ b/src/Symfony/Component/Intl/Tests/Locale/Verification/LocaleTest.php @@ -22,7 +22,7 @@ */ class LocaleTest extends AbstractLocaleTest { - protected function setUp() + protected function setUp(): void { IntlTestHelper::requireFullIntl($this, false); diff --git a/src/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php b/src/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php index 2e1e9e5bb60b..106e666967a1 100644 --- a/src/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php @@ -20,7 +20,7 @@ */ class NumberFormatterTest extends AbstractNumberFormatterTest { - protected function setUp() + protected function setUp(): void { IntlTestHelper::requireFullIntl($this, '55.1'); diff --git a/src/Symfony/Component/Intl/Tests/ResourceBundleTestCase.php b/src/Symfony/Component/Intl/Tests/ResourceBundleTestCase.php index 3e460985896c..abb4e4d2eacb 100644 --- a/src/Symfony/Component/Intl/Tests/ResourceBundleTestCase.php +++ b/src/Symfony/Component/Intl/Tests/ResourceBundleTestCase.php @@ -696,7 +696,7 @@ abstract class ResourceBundleTestCase extends TestCase private static $rootLocales; - protected function setUp() + protected function setUp(): void { Locale::setDefault('en'); Locale::setDefaultFallback('en'); diff --git a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php index 2d6e7b44a0fa..4b6f52bb8c06 100644 --- a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php +++ b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php @@ -27,7 +27,7 @@ class LdapManagerTest extends LdapTestCase /** @var Adapter */ private $adapter; - protected function setUp() + protected function setUp(): void { $this->adapter = new Adapter($this->getLdapConfig()); $this->adapter->getConnection()->bind('cn=admin,dc=symfony,dc=com', 'symfony'); diff --git a/src/Symfony/Component/Ldap/Tests/LdapTest.php b/src/Symfony/Component/Ldap/Tests/LdapTest.php index 42826ab52135..09975378fc46 100644 --- a/src/Symfony/Component/Ldap/Tests/LdapTest.php +++ b/src/Symfony/Component/Ldap/Tests/LdapTest.php @@ -26,7 +26,7 @@ class LdapTest extends TestCase /** @var Ldap */ private $ldap; - protected function setUp() + protected function setUp(): void { $this->adapter = $this->getMockBuilder(AdapterInterface::class)->getMock(); $this->ldap = new Ldap($this->adapter); diff --git a/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php index 7344e000af94..8eb2e6340b6d 100644 --- a/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php @@ -59,7 +59,7 @@ public function getStore() /** @var CombinedStore */ private $store; - protected function setUp() + protected function setUp(): void { $this->strategy = $this->getMockBuilder(StrategyInterface::class)->getMock(); $this->store1 = $this->getMockBuilder(StoreInterface::class)->getMock(); diff --git a/src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php index c474d9e0a8ee..6d770ff08b08 100644 --- a/src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php @@ -22,7 +22,7 @@ class MemcachedStoreTest extends AbstractStoreTest { use ExpiringStoreTestTrait; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { $memcached = new \Memcached(); $memcached->addServer(getenv('MEMCACHED_HOST'), 11211); diff --git a/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php index aa3984b521d8..d821887da4ce 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php @@ -16,7 +16,7 @@ */ class PredisStoreTest extends AbstractRedisStoreTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { $redis = new \Predis\Client('tcp://'.getenv('REDIS_HOST').':6379'); try { diff --git a/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php index 6f50dcefa61e..bcdecc780f97 100644 --- a/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php @@ -18,7 +18,7 @@ */ class RedisArrayStoreTest extends AbstractRedisStoreTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!class_exists('RedisArray')) { self::markTestSkipped('The RedisArray class is required.'); diff --git a/src/Symfony/Component/Lock/Tests/Store/RedisClusterStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/RedisClusterStoreTest.php index d6d72fb58e87..7a36b9a86a54 100644 --- a/src/Symfony/Component/Lock/Tests/Store/RedisClusterStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/RedisClusterStoreTest.php @@ -18,7 +18,7 @@ */ class RedisClusterStoreTest extends AbstractRedisStoreTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!class_exists('RedisCluster')) { self::markTestSkipped('The RedisCluster class is required.'); diff --git a/src/Symfony/Component/Lock/Tests/Store/RedisStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/RedisStoreTest.php index fd35ab4f2f66..81a0ccdb771a 100644 --- a/src/Symfony/Component/Lock/Tests/Store/RedisStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/RedisStoreTest.php @@ -18,7 +18,7 @@ */ class RedisStoreTest extends AbstractRedisStoreTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!@((new \Redis())->connect(getenv('REDIS_HOST')))) { $e = error_get_last(); diff --git a/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php b/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php index 8034cfe7cf90..c9333e26d505 100644 --- a/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php +++ b/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php @@ -22,7 +22,7 @@ class ConsensusStrategyTest extends TestCase /** @var ConsensusStrategy */ private $strategy; - protected function setUp() + protected function setUp(): void { $this->strategy = new ConsensusStrategy(); } diff --git a/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php b/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php index a07b42ddf52f..6953d3311c09 100644 --- a/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php +++ b/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php @@ -22,7 +22,7 @@ class UnanimousStrategyTest extends TestCase /** @var UnanimousStrategy */ private $strategy; - protected function setUp() + protected function setUp(): void { $this->strategy = new UnanimousStrategy(); } diff --git a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php index 8a6b9b52c1a8..43ebf408e90b 100644 --- a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php +++ b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php @@ -24,7 +24,7 @@ class OptionsResolverTest extends TestCase */ private $resolver; - protected function setUp() + protected function setUp(): void { $this->resolver = new OptionsResolver(); } diff --git a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php index 6d69a77e0862..a40027396461 100644 --- a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php +++ b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php @@ -21,7 +21,7 @@ class ExecutableFinderTest extends TestCase { private $path; - protected function tearDown() + protected function tearDown(): void { if ($this->path) { // Restore path if it was changed. diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 81808be51124..62920c5461a5 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -29,7 +29,7 @@ class ProcessTest extends TestCase private static $process; private static $sigchild; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { $phpBin = new PhpExecutableFinder(); self::$phpBin = getenv('SYMFONY_PROCESS_PHP_TEST_BINARY') ?: ('phpdbg' === \PHP_SAPI ? 'php' : $phpBin->find()); @@ -39,7 +39,7 @@ public static function setUpBeforeClass() self::$sigchild = false !== strpos(ob_get_clean(), '--enable-sigchild'); } - protected function tearDown() + protected function tearDown(): void { if (self::$process) { self::$process->stop(0); diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php index 3127d41cba36..dc576dfcb6a2 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php @@ -22,7 +22,7 @@ abstract class PropertyAccessorArrayAccessTest extends TestCase */ protected $propertyAccessor; - protected function setUp() + protected function setUp(): void { $this->propertyAccessor = new PropertyAccessor(); } diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorBuilderTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorBuilderTest.php index 63bd64225039..d35ffccc4a8c 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorBuilderTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorBuilderTest.php @@ -23,12 +23,12 @@ class PropertyAccessorBuilderTest extends TestCase */ protected $builder; - protected function setUp() + protected function setUp(): void { $this->builder = new PropertyAccessorBuilder(); } - protected function tearDown() + protected function tearDown(): void { $this->builder = null; } diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php index 2cb17bf4aa33..830942aab39a 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php @@ -34,7 +34,7 @@ class PropertyAccessorTest extends TestCase */ private $propertyAccessor; - protected function setUp() + protected function setUp(): void { $this->propertyAccessor = new PropertyAccessor(); } diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php index ec518738499e..1ae8fdd31d31 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php @@ -27,7 +27,7 @@ class PropertyPathBuilderTest extends TestCase */ private $builder; - protected function setUp() + protected function setUp(): void { $this->builder = new PropertyPathBuilder(new PropertyPath(self::PREFIX)); } diff --git a/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php index 928e867decd9..c8bd5b9b86cb 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php @@ -28,7 +28,7 @@ class AbstractPropertyInfoExtractorTest extends TestCase */ protected $propertyInfo; - protected function setUp() + protected function setUp(): void { $extractors = [new NullExtractor(), new DummyExtractor()]; $this->propertyInfo = new PropertyInfoExtractor($extractors, $extractors, $extractors, $extractors, $extractors); diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php index 930dc6e24c9b..15870e098b36 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php @@ -26,7 +26,7 @@ class PhpDocExtractorTest extends TestCase */ private $extractor; - protected function setUp() + protected function setUp(): void { $this->extractor = new PhpDocExtractor(); } diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php index b7dafe7d8f15..fe8d52a3c503 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php @@ -31,7 +31,7 @@ class ReflectionExtractorTest extends TestCase */ private $extractor; - protected function setUp() + protected function setUp(): void { $this->extractor = new ReflectionExtractor(); } diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/SerializerExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/SerializerExtractorTest.php index 791398e3f265..4e5d3ff12cc5 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/SerializerExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/SerializerExtractorTest.php @@ -27,7 +27,7 @@ class SerializerExtractorTest extends TestCase */ private $extractor; - protected function setUp() + protected function setUp(): void { $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); $this->extractor = new SerializerExtractor($classMetadataFactory); diff --git a/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php index 59dc3fb22be4..5a5de4727e3b 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php @@ -19,7 +19,7 @@ */ class PropertyInfoCacheExtractorTest extends AbstractPropertyInfoExtractorTest { - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php b/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php index 9755186c14d1..8ea60eb279f3 100644 --- a/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php +++ b/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php @@ -43,7 +43,7 @@ class PhpGeneratorDumperTest extends TestCase */ private $largeTestTmpFilepath; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -55,7 +55,7 @@ protected function setUp() @unlink($this->largeTestTmpFilepath); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php index fda96f81556e..078e6c71aad6 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php @@ -45,7 +45,7 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest */ private $loader; - protected function setUp() + protected function setUp(): void { $reader = new AnnotationReader(); $this->loader = new class($reader) extends AnnotationClassLoader { diff --git a/src/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php index df96a679e40f..858044d459f7 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php @@ -19,7 +19,7 @@ class AnnotationDirectoryLoaderTest extends AbstractAnnotationLoaderTest protected $loader; protected $reader; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php index a7ba684a049a..d0b670c3e2ed 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php @@ -20,7 +20,7 @@ class AnnotationFileLoaderTest extends AbstractAnnotationLoaderTest protected $loader; protected $reader; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php index 2657751b38cd..184d5089bc63 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php @@ -23,7 +23,7 @@ class DirectoryLoaderTest extends AbstractAnnotationLoaderTest private $loader; private $reader; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php index a25bface3efe..4c15451209b0 100644 --- a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php +++ b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php @@ -34,7 +34,7 @@ class PhpMatcherDumperTest extends TestCase */ private $dumpPath; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -42,7 +42,7 @@ protected function setUp() $this->dumpPath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'php_matcher.'.$this->matcherClass.'.php'; } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Routing/Tests/RouterTest.php b/src/Symfony/Component/Routing/Tests/RouterTest.php index da5c0f14f16f..fa0a2f5399ac 100644 --- a/src/Symfony/Component/Routing/Tests/RouterTest.php +++ b/src/Symfony/Component/Routing/Tests/RouterTest.php @@ -22,7 +22,7 @@ class RouterTest extends TestCase private $loader = null; - protected function setUp() + protected function setUp(): void { $this->loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); $this->router = new Router($this->loader, 'routing.yml'); diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php index 67118fde2fbf..a6949bb30184 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php @@ -23,7 +23,7 @@ class AuthorizationCheckerTest extends TestCase private $authorizationChecker; private $tokenStorage; - protected function setUp() + protected function setUp(): void { $this->authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); $this->accessDecisionManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')->getMock(); diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php index 50dc84e435a9..25d22975eb3d 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php @@ -20,7 +20,7 @@ class VoterTest extends TestCase { protected $token; - protected function setUp() + protected function setUp(): void { $this->token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); } diff --git a/src/Symfony/Component/Security/Core/Tests/Encoder/Argon2iPasswordEncoderTest.php b/src/Symfony/Component/Security/Core/Tests/Encoder/Argon2iPasswordEncoderTest.php index 9f2dbda4cf37..50e84e8de152 100644 --- a/src/Symfony/Component/Security/Core/Tests/Encoder/Argon2iPasswordEncoderTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Encoder/Argon2iPasswordEncoderTest.php @@ -23,7 +23,7 @@ class Argon2iPasswordEncoderTest extends TestCase { const PASSWORD = 'password'; - protected function setUp() + protected function setUp(): void { if (!Argon2iPasswordEncoder::isSupported()) { $this->markTestSkipped('Argon2i algorithm is not supported.'); diff --git a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php index 6b3e81d33748..efdc8585f0a3 100644 --- a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php @@ -46,7 +46,7 @@ protected function createValidator() return new UserPasswordValidator($this->tokenStorage, $this->encoderFactory); } - protected function setUp() + protected function setUp(): void { $user = $this->createUser(); $this->tokenStorage = $this->createTokenStorage($user); diff --git a/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php b/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php index 631c36a0db0a..55004068289f 100644 --- a/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php +++ b/src/Symfony/Component/Security/Csrf/Tests/CsrfTokenManagerTest.php @@ -210,12 +210,12 @@ private function getGeneratorAndStorage() ]; } - protected function setUp() + protected function setUp(): void { $_SERVER['HTTPS'] = 'on'; } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php b/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php index 07f85c221432..dc97acc239dd 100644 --- a/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php +++ b/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php @@ -33,17 +33,17 @@ class UriSafeTokenGeneratorTest extends TestCase */ private $generator; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$bytes = base64_decode('aMf+Tct/RLn2WQ=='); } - protected function setUp() + protected function setUp(): void { $this->generator = new UriSafeTokenGenerator(self::ENTROPY); } - protected function tearDown() + protected function tearDown(): void { $this->generator = null; } diff --git a/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php b/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php index 05f30b45330f..dd353515fea4 100644 --- a/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php +++ b/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php @@ -29,7 +29,7 @@ class NativeSessionTokenStorageTest extends TestCase */ private $storage; - protected function setUp() + protected function setUp(): void { $_SESSION = []; diff --git a/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php b/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php index 915724c52ea3..7ddd965e51d7 100644 --- a/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php +++ b/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/SessionTokenStorageTest.php @@ -33,7 +33,7 @@ class SessionTokenStorageTest extends TestCase */ private $storage; - protected function setUp() + protected function setUp(): void { $this->session = new Session(new MockArraySessionStorage()); $this->storage = new SessionTokenStorage($this->session, self::SESSION_NAMESPACE); diff --git a/src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php b/src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php index bbc44c8b0a0c..cb889617b15c 100644 --- a/src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Guard/Tests/Authenticator/FormLoginAuthenticatorTest.php @@ -75,7 +75,7 @@ public function testStartWithSession() $this->assertEquals(self::LOGIN_URL, $failureResponse->getTargetUrl()); } - protected function setUp() + protected function setUp(): void { $this->requestWithoutSession = new Request([], [], [], [], [], []); $this->requestWithSession = new Request([], [], [], [], [], []); diff --git a/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php b/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php index b103b200295a..c5e1c92b89fd 100644 --- a/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php +++ b/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php @@ -260,7 +260,7 @@ public function testReturnNullFromGetCredentials() $listener($this->event); } - protected function setUp() + protected function setUp(): void { $this->authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager') ->disableOriginalConstructor() @@ -285,7 +285,7 @@ protected function setUp() $this->rememberMeServices = $this->getMockBuilder('Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface')->getMock(); } - protected function tearDown() + protected function tearDown(): void { $this->authenticationManager = null; $this->guardAuthenticatorHandler = null; diff --git a/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php b/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php index 0e5864ceaa6d..9fde054d2c52 100644 --- a/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php +++ b/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php @@ -153,7 +153,7 @@ public function testSessionStrategyIsNotCalledWhenStateless() $handler->authenticateWithToken($this->token, $this->request, 'some_provider_key'); } - protected function setUp() + protected function setUp(): void { $this->tokenStorage = $this->getMockBuilder(TokenStorageInterface::class)->getMock(); $this->dispatcher = $this->getMockBuilder(EventDispatcherInterface::class)->getMock(); @@ -163,7 +163,7 @@ protected function setUp() $this->guardAuthenticator = $this->getMockBuilder(AuthenticatorInterface::class)->getMock(); } - protected function tearDown() + protected function tearDown(): void { $this->tokenStorage = null; $this->dispatcher = null; diff --git a/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php b/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php index 36b05320f870..6de6ec029a15 100644 --- a/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php +++ b/src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php @@ -165,7 +165,7 @@ public function testAuthenticateFailsOnNonOriginatingToken() $provider->authenticate($token); } - protected function setUp() + protected function setUp(): void { $this->userProvider = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserProviderInterface')->getMock(); $this->userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock(); @@ -174,7 +174,7 @@ protected function setUp() ->getMock(); } - protected function tearDown() + protected function tearDown(): void { $this->userProvider = null; $this->userChecker = null; diff --git a/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php index a71ad179a355..e7588e275a88 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php @@ -26,7 +26,7 @@ class DefaultAuthenticationFailureHandlerTest extends TestCase private $session; private $exception; - protected function setUp() + protected function setUp(): void { $this->httpKernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); $this->httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); diff --git a/src/Symfony/Component/Security/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php index 5328bdcf0570..107a133739fa 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php @@ -36,7 +36,7 @@ class SimpleAuthenticationHandlerTest extends TestCase private $response; - protected function setUp() + protected function setUp(): void { $this->successHandler = $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface')->getMock(); $this->failureHandler = $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface')->getMock(); diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php index a9e1459a648c..5cc45932a864 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php @@ -97,7 +97,7 @@ public function testHandlecatchAuthenticationException() $listener($this->event); } - protected function setUp() + protected function setUp(): void { $this->authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager') ->disableOriginalConstructor() @@ -120,7 +120,7 @@ protected function setUp() $this->token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); } - protected function tearDown() + protected function tearDown(): void { $this->authenticationManager = null; $this->dispatcher = null; diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php index f9f3fc190fe2..e3db00cb001d 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php @@ -39,7 +39,7 @@ class SwitchUserListenerTest extends TestCase private $event; - protected function setUp() + protected function setUp(): void { $this->tokenStorage = new TokenStorage(); $this->userProvider = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserProviderInterface')->getMock(); diff --git a/src/Symfony/Component/Security/Http/Tests/Logout/CsrfTokenClearingLogoutHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/Logout/CsrfTokenClearingLogoutHandlerTest.php index fe34eaa6e5da..06eb56139ea1 100644 --- a/src/Symfony/Component/Security/Http/Tests/Logout/CsrfTokenClearingLogoutHandlerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Logout/CsrfTokenClearingLogoutHandlerTest.php @@ -25,7 +25,7 @@ class CsrfTokenClearingLogoutHandlerTest extends TestCase private $csrfTokenStorage; private $csrfTokenClearingLogoutHandler; - protected function setUp() + protected function setUp(): void { $this->session = new Session(new MockArraySessionStorage()); $this->csrfTokenStorage = new SessionTokenStorage($this->session, 'foo'); diff --git a/src/Symfony/Component/Security/Http/Tests/Logout/LogoutUrlGeneratorTest.php b/src/Symfony/Component/Security/Http/Tests/Logout/LogoutUrlGeneratorTest.php index 874a35ab7b5d..1d9c5e6c88ce 100644 --- a/src/Symfony/Component/Security/Http/Tests/Logout/LogoutUrlGeneratorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Logout/LogoutUrlGeneratorTest.php @@ -29,7 +29,7 @@ class LogoutUrlGeneratorTest extends TestCase /** @var LogoutUrlGenerator */ private $generator; - protected function setUp() + protected function setUp(): void { $requestStack = $this->getMockBuilder(RequestStack::class)->getMock(); $request = $this->getMockBuilder(Request::class)->getMock(); diff --git a/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php b/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php index 7afa48edc950..a3d9c2c5fe28 100644 --- a/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php +++ b/src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php @@ -25,7 +25,7 @@ class PersistentTokenBasedRememberMeServicesTest extends TestCase { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { try { random_bytes(1); diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php index 5bdbd282ef3a..301b43586970 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php @@ -24,7 +24,7 @@ class ChainDecoderTest extends TestCase private $decoder1; private $decoder2; - protected function setUp() + protected function setUp(): void { $this->decoder1 = $this ->getMockBuilder('Symfony\Component\Serializer\Encoder\DecoderInterface') diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php index 9f674e030842..2294b2afec51 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php @@ -26,7 +26,7 @@ class ChainEncoderTest extends TestCase private $encoder1; private $encoder2; - protected function setUp() + protected function setUp(): void { $this->encoder1 = $this ->getMockBuilder('Symfony\Component\Serializer\Encoder\EncoderInterface') diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php index 490cc16a6281..0f93a99cd932 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php @@ -24,7 +24,7 @@ class CsvEncoderTest extends TestCase */ private $encoder; - protected function setUp() + protected function setUp(): void { $this->encoder = new CsvEncoder(); } diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php index 08bb3f63e645..809bd02796e9 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php @@ -20,7 +20,7 @@ class JsonDecodeTest extends TestCase /** @var \Symfony\Component\Serializer\Encoder\JsonDecode */ private $decode; - protected function setUp() + protected function setUp(): void { $this->decode = new JsonDecode(); } diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php index 31773ab556aa..c79b9bd945dd 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php @@ -19,7 +19,7 @@ class JsonEncodeTest extends TestCase { private $encode; - protected function setUp() + protected function setUp(): void { $this->encode = new JsonEncode(); } diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php index 191e8dc35d3e..75187b9748ed 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php @@ -21,7 +21,7 @@ class JsonEncoderTest extends TestCase private $encoder; private $serializer; - protected function setUp() + protected function setUp(): void { $this->encoder = new JsonEncoder(); $this->serializer = new Serializer([new CustomNormalizer()], ['json' => new JsonEncoder()]); diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php index ce873ba77354..60e73aa36fdb 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php @@ -30,7 +30,7 @@ class XmlEncoderTest extends TestCase private $exampleDateTimeString = '2017-02-19T15:16:08+0300'; - protected function setUp() + protected function setUp(): void { $this->encoder = new XmlEncoder(); $serializer = new Serializer([new CustomNormalizer()], ['xml' => new XmlEncoder()]); diff --git a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php index c042b15f898c..80bfe3d0c562 100644 --- a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTest.php @@ -32,7 +32,7 @@ class AnnotationLoaderTest extends TestCase */ private $loader; - protected function setUp() + protected function setUp(): void { $this->loader = new AnnotationLoader(new AnnotationReader()); } diff --git a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/XmlFileLoaderTest.php index 13634a63ab82..4fc4032f962b 100644 --- a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/XmlFileLoaderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/XmlFileLoaderTest.php @@ -35,7 +35,7 @@ class XmlFileLoaderTest extends TestCase */ private $metadata; - protected function setUp() + protected function setUp(): void { $this->loader = new XmlFileLoader(__DIR__.'/../../Fixtures/serialization.xml'); $this->metadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'); diff --git a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/YamlFileLoaderTest.php index e9aa578f7d4f..83e68f73e90e 100644 --- a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/YamlFileLoaderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/YamlFileLoaderTest.php @@ -35,7 +35,7 @@ class YamlFileLoaderTest extends TestCase */ private $metadata; - protected function setUp() + protected function setUp(): void { $this->loader = new YamlFileLoader(__DIR__.'/../../Fixtures/serialization.yml'); $this->metadata = new ClassMetadata('Symfony\Component\Serializer\Tests\Fixtures\GroupDummy'); diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php index b267c3fcd29f..cc84452cbe48 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php @@ -35,7 +35,7 @@ class AbstractNormalizerTest extends TestCase */ private $classMetadata; - protected function setUp() + protected function setUp(): void { $loader = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\Loader\LoaderChain')->setConstructorArgs([[]])->getMock(); $this->classMetadata = $this->getMockBuilder('Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory')->setConstructorArgs([$loader])->getMock(); diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php index 27bd361d3acb..a8302be91ed7 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php @@ -28,7 +28,7 @@ class ArrayDenormalizerTest extends TestCase */ private $serializer; - protected function setUp() + protected function setUp(): void { $this->serializer = $this->getMockBuilder('Symfony\Component\Serializer\Serializer')->getMock(); $this->denormalizer = new ArrayDenormalizer(); diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php index 28fb73ece5bc..b7566f8cf400 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php @@ -23,7 +23,7 @@ class CustomNormalizerTest extends TestCase */ private $normalizer; - protected function setUp() + protected function setUp(): void { $this->normalizer = new CustomNormalizer(); $this->normalizer->setSerializer(new Serializer()); diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php index 1df201f41fb7..d1829f759dda 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php @@ -29,7 +29,7 @@ class DataUriNormalizerTest extends TestCase */ private $normalizer; - protected function setUp() + protected function setUp(): void { $this->normalizer = new DataUriNormalizer(); } diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php index 8d40183abd31..aaff9736653d 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php @@ -15,7 +15,7 @@ class DateIntervalNormalizerTest extends TestCase */ private $normalizer; - protected function setUp() + protected function setUp(): void { $this->normalizer = new DateIntervalNormalizer(); } diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php index 1068a3951b63..f4669b134e71 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php @@ -24,7 +24,7 @@ class DateTimeNormalizerTest extends TestCase */ private $normalizer; - protected function setUp() + protected function setUp(): void { $this->normalizer = new DateTimeNormalizer(); } diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php index d7213a75eb22..f58d43ce1eb3 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php @@ -61,7 +61,7 @@ class GetSetMethodNormalizerTest extends TestCase */ private $serializer; - protected function setUp() + protected function setUp(): void { $this->createNormalizer(); } diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/JsonSerializableNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/JsonSerializableNormalizerTest.php index bdcd4d983f74..f1373516a9c2 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/JsonSerializableNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/JsonSerializableNormalizerTest.php @@ -33,7 +33,7 @@ class JsonSerializableNormalizerTest extends TestCase */ private $serializer; - protected function setUp() + protected function setUp(): void { $this->createNormalizer(); } diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php index abc1d44a1792..0b4c5f5e6d20 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php @@ -71,7 +71,7 @@ class ObjectNormalizerTest extends TestCase */ private $serializer; - protected function setUp() + protected function setUp(): void { $this->createNormalizer(); } diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php index 497a7607d957..9a8eb3fb38c0 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php @@ -62,7 +62,7 @@ class PropertyNormalizerTest extends TestCase */ private $serializer; - protected function setUp() + protected function setUp(): void { $this->createNormalizer(); } diff --git a/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php b/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php index c81698bd89ca..4c946ea486cb 100644 --- a/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php +++ b/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php @@ -21,7 +21,7 @@ class ChainLoaderTest extends TestCase protected $loader1; protected $loader2; - protected function setUp() + protected function setUp(): void { $fixturesPath = realpath(__DIR__.'/../Fixtures/'); $this->loader1 = new FilesystemLoader($fixturesPath.'/null/%name%'); diff --git a/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php b/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php index c6dcdefc95f5..36a63bce3b67 100644 --- a/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php +++ b/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php @@ -19,7 +19,7 @@ class FilesystemLoaderTest extends TestCase { protected static $fixturesPath; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } diff --git a/src/Symfony/Component/Templating/Tests/PhpEngineTest.php b/src/Symfony/Component/Templating/Tests/PhpEngineTest.php index 4bce834150fb..fc62a97dc26a 100644 --- a/src/Symfony/Component/Templating/Tests/PhpEngineTest.php +++ b/src/Symfony/Component/Templating/Tests/PhpEngineTest.php @@ -24,12 +24,12 @@ class PhpEngineTest extends TestCase { protected $loader; - protected function setUp() + protected function setUp(): void { $this->loader = new ProjectTemplateLoader(); } - protected function tearDown() + protected function tearDown(): void { $this->loader = null; } diff --git a/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php b/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php index c67dc376c236..19a38dd23625 100644 --- a/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php +++ b/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php @@ -19,12 +19,12 @@ class TemplateNameParserTest extends TestCase { protected $parser; - protected function setUp() + protected function setUp(): void { $this->parser = new TemplateNameParser(); } - protected function tearDown() + protected function tearDown(): void { $this->parser = null; } diff --git a/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php b/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php index bd97a2445c0a..1a600c8c6bbd 100644 --- a/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php +++ b/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php @@ -17,7 +17,7 @@ class TranslationDataCollectorTest extends TestCase { - protected function setUp() + protected function setUp(): void { if (!class_exists('Symfony\Component\HttpKernel\DataCollector\DataCollector')) { $this->markTestSkipped('The "DataCollector" is not available'); diff --git a/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php b/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php index dbb7007a8f62..a630a7a3ce4f 100644 --- a/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php +++ b/src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php @@ -18,14 +18,14 @@ class IdentityTranslatorTest extends TranslatorTest { private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->defaultLocale = \Locale::getDefault(); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php b/src/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php index 279e9fde5b66..b4a4a12e2708 100644 --- a/src/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php +++ b/src/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php @@ -15,7 +15,7 @@ abstract class LocalizedTestCase extends TestCase { - protected function setUp() + protected function setUp(): void { if (!\extension_loaded('intl')) { $this->markTestSkipped('Extension intl is required.'); diff --git a/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php b/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php index 6ec2d7ecaf1e..08add3404b5c 100644 --- a/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php +++ b/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php @@ -23,13 +23,13 @@ class TranslatorCacheTest extends TestCase { protected $tmpDir; - protected function setUp() + protected function setUp(): void { $this->tmpDir = sys_get_temp_dir().'/sf_translation'; $this->deleteTmpDir(); } - protected function tearDown() + protected function tearDown(): void { $this->deleteTmpDir(); } diff --git a/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php b/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php index 73d81cbfad9c..ec57b07c8428 100644 --- a/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php +++ b/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php @@ -19,12 +19,12 @@ class ConstraintViolationListTest extends TestCase { protected $list; - protected function setUp() + protected function setUp(): void { $this->list = new ConstraintViolationList(); } - protected function tearDown() + protected function tearDown(): void { $this->list = null; } diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php index 3c3c889faea1..4f8ad86c5c87 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php @@ -20,14 +20,14 @@ class CountryValidatorTest extends ConstraintValidatorTestCase { private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->defaultLocale = \Locale::getDefault(); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php index 73f104449719..08aef0010d61 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php @@ -20,14 +20,14 @@ class CurrencyValidatorTest extends ConstraintValidatorTestCase { private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->defaultLocale = \Locale::getDefault(); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php index a4b8e961f1cb..16d5b7f42422 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php @@ -27,7 +27,7 @@ protected function createValidator() return new FileValidator(); } - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -36,7 +36,7 @@ protected function setUp() fwrite($this->file, ' ', 1); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php index 174ba5d99c16..2ad9ceb5d898 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php @@ -39,7 +39,7 @@ protected function createValidator() return new ImageValidator(); } - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php index 1be8089db3e0..391d124db2d6 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php @@ -20,14 +20,14 @@ class LanguageValidatorTest extends ConstraintValidatorTestCase { private $defaultLocale; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->defaultLocale = \Locale::getDefault(); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php index 17334bea7925..6112c4040a03 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php @@ -172,7 +172,7 @@ protected function createFile() return static::$file; } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { if (static::$file) { fclose(static::$file); diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Cache/DoctrineCacheTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Cache/DoctrineCacheTest.php index 6296030fd7df..c30e41931a2d 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/Cache/DoctrineCacheTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/Cache/DoctrineCacheTest.php @@ -16,7 +16,7 @@ class DoctrineCacheTest extends AbstractCacheTest { - protected function setUp() + protected function setUp(): void { $this->cache = new DoctrineCache(new ArrayCache()); } diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Cache/Psr6CacheTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Cache/Psr6CacheTest.php index fcac5e232ae4..199cbe92524f 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/Cache/Psr6CacheTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/Cache/Psr6CacheTest.php @@ -11,7 +11,7 @@ */ class Psr6CacheTest extends AbstractCacheTest { - protected function setUp() + protected function setUp(): void { $this->cache = new Psr6Cache(new ArrayAdapter()); } diff --git a/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php b/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php index 73af5c189405..bbe3475ebdb4 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php @@ -28,12 +28,12 @@ class ClassMetadataTest extends TestCase protected $metadata; - protected function setUp() + protected function setUp(): void { $this->metadata = new ClassMetadata(self::CLASSNAME); } - protected function tearDown() + protected function tearDown(): void { $this->metadata = null; } diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php index 069ccd322929..26d0ce3c8094 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/StaticMethodLoaderTest.php @@ -20,12 +20,12 @@ class StaticMethodLoaderTest extends TestCase { private $errorLevel; - protected function setUp() + protected function setUp(): void { $this->errorLevel = error_reporting(); } - protected function tearDown() + protected function tearDown(): void { error_reporting($this->errorLevel); } diff --git a/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php b/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php index 651ba9564254..d84b185ab894 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php @@ -22,7 +22,7 @@ class MemberMetadataTest extends TestCase { protected $metadata; - protected function setUp() + protected function setUp(): void { $this->metadata = new TestMemberMetadata( 'Symfony\Component\Validator\Tests\Fixtures\Entity', @@ -31,7 +31,7 @@ protected function setUp() ); } - protected function tearDown() + protected function tearDown(): void { $this->metadata = null; } diff --git a/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php b/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php index 697be6edc63f..c727e43931d7 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php @@ -43,7 +43,7 @@ abstract class AbstractTest extends AbstractValidatorTest */ abstract protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = []); - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php b/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php index 07e45f47eb2c..c4c86e9eb63c 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php @@ -47,7 +47,7 @@ abstract class AbstractValidatorTest extends TestCase */ public $referenceMetadata; - protected function setUp() + protected function setUp(): void { $this->metadataFactory = new FakeMetadataFactory(); $this->metadata = new ClassMetadata(self::ENTITY_CLASS); @@ -56,7 +56,7 @@ protected function setUp() $this->metadataFactory->addMetadata($this->referenceMetadata); } - protected function tearDown() + protected function tearDown(): void { $this->metadataFactory = null; $this->metadata = null; diff --git a/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php b/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php index a76a36354756..0767742641e2 100644 --- a/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php +++ b/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php @@ -23,12 +23,12 @@ class ValidatorBuilderTest extends TestCase */ protected $builder; - protected function setUp() + protected function setUp(): void { $this->builder = new ValidatorBuilder(); } - protected function tearDown() + protected function tearDown(): void { $this->builder = null; } diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php index 518780704020..762597707eae 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php @@ -28,7 +28,7 @@ private function getTestException($msg, &$ref = null) return new \Exception(''.$msg); } - protected function tearDown() + protected function tearDown(): void { ExceptionCaster::$srcContext = 1; ExceptionCaster::$traceArgs = true; diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php index 1d7b3f62787a..8c0bc6ec7c27 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php @@ -24,13 +24,13 @@ class XmlReaderCasterTest extends TestCase /** @var \XmlReader */ private $reader; - protected function setUp() + protected function setUp(): void { $this->reader = new \XmlReader(); $this->reader->open(__DIR__.'/../Fixtures/xml_reader.xml'); } - protected function tearDown() + protected function tearDown(): void { $this->reader->close(); } diff --git a/src/Symfony/Component/WebLink/Tests/HttpHeaderSerializerTest.php b/src/Symfony/Component/WebLink/Tests/HttpHeaderSerializerTest.php index fb4bbd96f210..5347528ae02e 100644 --- a/src/Symfony/Component/WebLink/Tests/HttpHeaderSerializerTest.php +++ b/src/Symfony/Component/WebLink/Tests/HttpHeaderSerializerTest.php @@ -22,7 +22,7 @@ class HttpHeaderSerializerTest extends TestCase */ private $serializer; - protected function setUp() + protected function setUp(): void { $this->serializer = new HttpHeaderSerializer(); } diff --git a/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php b/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php index 1c769edb2a77..a8ca5814af17 100644 --- a/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php +++ b/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php @@ -13,7 +13,7 @@ class GraphvizDumperTest extends TestCase private $dumper; - protected function setUp() + protected function setUp(): void { $this->dumper = new GraphvizDumper(); } diff --git a/src/Symfony/Component/Workflow/Tests/Dumper/StateMachineGraphvizDumperTest.php b/src/Symfony/Component/Workflow/Tests/Dumper/StateMachineGraphvizDumperTest.php index 0507b70ae115..375aa9fe7d68 100644 --- a/src/Symfony/Component/Workflow/Tests/Dumper/StateMachineGraphvizDumperTest.php +++ b/src/Symfony/Component/Workflow/Tests/Dumper/StateMachineGraphvizDumperTest.php @@ -13,7 +13,7 @@ class StateMachineGraphvizDumperTest extends TestCase private $dumper; - protected function setUp() + protected function setUp(): void { $this->dumper = new StateMachineGraphvizDumper(); } diff --git a/src/Symfony/Component/Workflow/Tests/EventListener/GuardListenerTest.php b/src/Symfony/Component/Workflow/Tests/EventListener/GuardListenerTest.php index 805b62624656..4040c0ff1475 100644 --- a/src/Symfony/Component/Workflow/Tests/EventListener/GuardListenerTest.php +++ b/src/Symfony/Component/Workflow/Tests/EventListener/GuardListenerTest.php @@ -24,7 +24,7 @@ class GuardListenerTest extends TestCase private $listener; private $configuration; - protected function setUp() + protected function setUp(): void { $this->configuration = [ 'test_is_granted' => 'is_granted("something")', @@ -44,7 +44,7 @@ protected function setUp() $this->listener = new GuardListener($this->configuration, $expressionLanguage, $tokenStorage, $this->authenticationChecker, $trustResolver, null, $this->validator); } - protected function tearDown() + protected function tearDown(): void { $this->authenticationChecker = null; $this->validator = null; diff --git a/src/Symfony/Component/Workflow/Tests/RegistryTest.php b/src/Symfony/Component/Workflow/Tests/RegistryTest.php index bce51c5372cf..e7477db68369 100644 --- a/src/Symfony/Component/Workflow/Tests/RegistryTest.php +++ b/src/Symfony/Component/Workflow/Tests/RegistryTest.php @@ -15,7 +15,7 @@ class RegistryTest extends TestCase { private $registry; - protected function setUp() + protected function setUp(): void { $this->registry = new Registry(); @@ -24,7 +24,7 @@ protected function setUp() $this->registry->addWorkflow(new Workflow(new Definition([], []), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow3'), $this->createWorkflowSupportStrategy(Subject2::class)); } - protected function tearDown() + protected function tearDown(): void { $this->registry = null; } diff --git a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php index a75c5f9f5ade..4ab7d17d7c2e 100644 --- a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php @@ -125,13 +125,13 @@ protected function createCommandTester() return new CommandTester($command); } - protected function setUp() + protected function setUp(): void { $this->files = []; @mkdir(sys_get_temp_dir().'/framework-yml-lint-test'); } - protected function tearDown() + protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { diff --git a/src/Symfony/Component/Yaml/Tests/DumperTest.php b/src/Symfony/Component/Yaml/Tests/DumperTest.php index 6c878ff7b491..d5660270358e 100644 --- a/src/Symfony/Component/Yaml/Tests/DumperTest.php +++ b/src/Symfony/Component/Yaml/Tests/DumperTest.php @@ -38,14 +38,14 @@ class DumperTest extends TestCase ], ]; - protected function setUp() + protected function setUp(): void { $this->parser = new Parser(); $this->dumper = new Dumper(); $this->path = __DIR__.'/Fixtures'; } - protected function tearDown() + protected function tearDown(): void { $this->parser = null; $this->dumper = null; diff --git a/src/Symfony/Component/Yaml/Tests/InlineTest.php b/src/Symfony/Component/Yaml/Tests/InlineTest.php index 1b899fd54ea2..74dc8ff19a5c 100644 --- a/src/Symfony/Component/Yaml/Tests/InlineTest.php +++ b/src/Symfony/Component/Yaml/Tests/InlineTest.php @@ -19,7 +19,7 @@ class InlineTest extends TestCase { - protected function setUp() + protected function setUp(): void { Inline::initialize(0, 0); } diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php index 1ce99468c462..366902a8647e 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -21,12 +21,12 @@ class ParserTest extends TestCase /** @var Parser */ protected $parser; - protected function setUp() + protected function setUp(): void { $this->parser = new Parser(); } - protected function tearDown() + protected function tearDown(): void { $this->parser = null;