diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 583be2ac59..fdb481fd19 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -11,6 +11,7 @@ return (new PhpCsFixer\Config()) '@Symfony' => true, '@Symfony:risky' => true, 'protected_to_private' => false, + 'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => false], ]) ->setRiskyAllowed(true) ->setFinder( diff --git a/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php b/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php index 5ddd60df8e..a004935a6a 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php @@ -19,9 +19,6 @@ class ManagerRegistryTest extends TestCase { public static function setUpBeforeClass(): void { - if (!class_exists(\PHPUnit_Framework_TestCase::class)) { - self::markTestSkipped('proxy-manager-bridge is not yet compatible with namespaced phpunit versions.'); - } $test = new PhpDumperTest(); $test->testDumpContainerWithProxyServiceWillShareProxies(); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/bundles.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/bundles.php index 2e46e896bc..13ab9fddee 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/bundles.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/bundles.php @@ -10,7 +10,6 @@ */ use Symfony\Bundle\FrameworkBundle\FrameworkBundle; -use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; return [ new FrameworkBundle(), diff --git a/src/Symfony/Component/Cache/Tests/Adapter/ArrayAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/ArrayAdapterTest.php index 9292b1c962..5ed33cee77 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/ArrayAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/ArrayAdapterTest.php @@ -49,7 +49,7 @@ class ArrayAdapterTest extends AdapterTestCase // Fail (should be missing from $values) $item = $cache->getItem('buz'); - $cache->save($item->set(function() {})); + $cache->save($item->set(function () {})); $values = $cache->getValues(); diff --git a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php index 74ae972e54..bec4275404 100644 --- a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php @@ -225,7 +225,7 @@ class ExprBuilderTest extends TestCase * * @return array The finalized config values */ - protected function finalizeTestBuilder(NodeDefinition $nodeDefinition, ?array $config = null): array + protected function finalizeTestBuilder(NodeDefinition $nodeDefinition, array $config = null): array { return $nodeDefinition ->end() diff --git a/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php index 8ba3a8c2c9..e097205e8c 100644 --- a/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php @@ -64,7 +64,7 @@ class ReflectionClassResourceTest extends TestCase /** * @dataProvider provideHashedSignature */ - public function testHashedSignature(bool $changeExpected, int $changedLine, ?string $changedCode, ?\Closure $setContext = null) + public function testHashedSignature(bool $changeExpected, int $changedLine, ?string $changedCode, \Closure $setContext = null) { if ($setContext) { $setContext(); 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 a7f7e8f817..200567a29d 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php @@ -40,7 +40,7 @@ class MemcachedSessionHandlerTest extends TestCase $r = new \ReflectionClass(\Memcached::class); $methodsToMock = array_map(function ($m) { return $m->name; }, $r->getMethods(\ReflectionMethod::IS_PUBLIC)); - $methodsToMock = array_diff($methodsToMock, ['getDelayed','getDelayedByKey']); + $methodsToMock = array_diff($methodsToMock, ['getDelayed', 'getDelayedByKey']); $this->memcached = $this->getMockBuilder(\Memcached::class) ->disableOriginalConstructor() diff --git a/src/Symfony/Component/Mailer/Transport/Dsn.php b/src/Symfony/Component/Mailer/Transport/Dsn.php index cc25f7a237..04d3540f7b 100644 --- a/src/Symfony/Component/Mailer/Transport/Dsn.php +++ b/src/Symfony/Component/Mailer/Transport/Dsn.php @@ -25,7 +25,7 @@ final class Dsn private $port; private $options; - public function __construct(string $scheme, string $host, ?string $user = null, ?string $password = null, ?int $port = null, array $options = []) + public function __construct(string $scheme, string $host, string $user = null, string $password = null, int $port = null, array $options = []) { $this->scheme = $scheme; $this->host = $host; diff --git a/src/Symfony/Component/Yaml/Exception/ParseException.php b/src/Symfony/Component/Yaml/Exception/ParseException.php index c75066da2d..82c05a714f 100644 --- a/src/Symfony/Component/Yaml/Exception/ParseException.php +++ b/src/Symfony/Component/Yaml/Exception/ParseException.php @@ -24,10 +24,10 @@ class ParseException extends RuntimeException private $rawMessage; /** - * @param string $message The error message - * @param int $parsedLine The line where the error occurred - * @param string|null $snippet The snippet of code near the problem - * @param string|null $parsedFile The file name where the error occurred + * @param string $message The error message + * @param int $parsedLine The line where the error occurred + * @param string|null $snippet The snippet of code near the problem + * @param string|null $parsedFile The file name where the error occurred */ public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Throwable $previous = null) {