Skip to content

Commit 0aa01d9

Browse files
Merge branch '7.0' into 7.1
* 7.0: List CS fix in .git-blame-ignore-revs Fix implicitly-required parameters minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench) Fix bad merge List CS fix in .git-blame-ignore-revs Fix implicitly-required parameters List CS fix in .git-blame-ignore-revs Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2 parents b45fc93 + dc9b5ef commit 0aa01d9

File tree

14 files changed

+25
-25
lines changed

14 files changed

+25
-25
lines changed

CacheWarmer/ProxyCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function isOptional(): bool
3939
return false;
4040
}
4141

42-
public function warmUp(string $cacheDir, string $buildDir = null): array
42+
public function warmUp(string $cacheDir, ?string $buildDir = null): array
4343
{
4444
$files = [];
4545
foreach ($this->registry->getManagers() as $em) {

ContainerAwareEventManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct(ContainerInterface $container, array $listeners = []
4444
$this->listeners = $listeners;
4545
}
4646

47-
public function dispatchEvent(string $eventName, EventArgs $eventArgs = null): void
47+
public function dispatchEvent(string $eventName, ?EventArgs $eventArgs = null): void
4848
{
4949
if (!$this->initializedSubscribers) {
5050
$this->initializeSubscribers();

DataCollector/DoctrineDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(
3939
$this->managers = $registry->getManagerNames();
4040
}
4141

42-
public function collect(Request $request, Response $response, \Throwable $exception = null): void
42+
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
4343
{
4444
$this->data = [
4545
'queries' => $this->collectQueries(),

DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ protected function setMappingDriverConfig(array $mappingConfig, string $mappingN
134134
*
135135
* Returns false when autodetection failed, an array of the completed information otherwise.
136136
*/
137-
protected function getMappingDriverBundleConfigDefaults(array $bundleConfig, \ReflectionClass $bundle, ContainerBuilder $container, string $bundleDir = null): array|false
137+
protected function getMappingDriverBundleConfigDefaults(array $bundleConfig, \ReflectionClass $bundle, ContainerBuilder $container, ?string $bundleDir = null): array|false
138138
{
139139
$bundleClassDir = \dirname($bundle->getFileName());
140140
$bundleDir ??= $bundleClassDir;
@@ -386,7 +386,7 @@ abstract protected function getMappingObjectDefaultName(): string;
386386
/**
387387
* Relative path from the bundle root to the directory where mapping files reside.
388388
*/
389-
abstract protected function getMappingResourceConfigDirectory(string $bundleDir = null): string;
389+
abstract protected function getMappingResourceConfigDirectory(?string $bundleDir = null): string;
390390

391391
/**
392392
* Extension used by the mapping files.

Form/ChoiceList/IdReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function isIntId(): bool
7676
*
7777
* This method assumes that the object has a single-column ID.
7878
*/
79-
public function getIdValue(object $object = null): string
79+
public function getIdValue(?object $object = null): string
8080
{
8181
if (!$object) {
8282
return '';

IdGenerator/UuidGenerator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ final class UuidGenerator extends AbstractIdGenerator
2626
private UuidFactory|NameBasedUuidFactory|RandomBasedUuidFactory|TimeBasedUuidFactory $factory;
2727
private ?string $entityGetter = null;
2828

29-
public function __construct(UuidFactory $factory = null)
29+
public function __construct(?UuidFactory $factory = null)
3030
{
3131
$this->protoFactory = $this->factory = $factory ?? new UuidFactory();
3232
}
@@ -52,7 +52,7 @@ public function generateId(EntityManagerInterface $em, $entity): Uuid
5252
return $this->factory->create();
5353
}
5454

55-
public function nameBased(string $entityGetter, Uuid|string $namespace = null): static
55+
public function nameBased(string $entityGetter, Uuid|string|null $namespace = null): static
5656
{
5757
$clone = clone $this;
5858
$clone->factory = $clone->protoFactory->nameBased($namespace);
@@ -70,7 +70,7 @@ public function randomBased(): static
7070
return $clone;
7171
}
7272

73-
public function timeBased(Uuid|string $node = null): static
73+
public function timeBased(Uuid|string|null $node = null): static
7474
{
7575
$clone = clone $this;
7676
$clone->factory = $clone->protoFactory->timeBased($node);

Messenger/AbstractDoctrineMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ abstract class AbstractDoctrineMiddleware implements MiddlewareInterface
2828
protected ManagerRegistry $managerRegistry;
2929
protected ?string $entityManagerName;
3030

31-
public function __construct(ManagerRegistry $managerRegistry, string $entityManagerName = null)
31+
public function __construct(ManagerRegistry $managerRegistry, ?string $entityManagerName = null)
3232
{
3333
$this->managerRegistry = $managerRegistry;
3434
$this->entityManagerName = $entityManagerName;

Messenger/DoctrineOpenTransactionLoggerMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class DoctrineOpenTransactionLoggerMiddleware extends AbstractDoctrineMiddleware
2828

2929
public function __construct(
3030
ManagerRegistry $managerRegistry,
31-
string $entityManagerName = null,
31+
?string $entityManagerName = null,
3232
private readonly ?LoggerInterface $logger = null,
3333
) {
3434
parent::__construct($managerRegistry, $entityManagerName);

Tests/ArgumentResolver/EntityValueResolverTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,12 @@ public function testAlreadyResolved()
388388
$this->assertSame([], $resolver->resolve($request, $argument));
389389
}
390390

391-
private function createArgument(string $class = null, MapEntity $entity = null, string $name = 'arg', bool $isNullable = false): ArgumentMetadata
391+
private function createArgument(?string $class = null, ?MapEntity $entity = null, string $name = 'arg', bool $isNullable = false): ArgumentMetadata
392392
{
393393
return new ArgumentMetadata($name, $class ?? \stdClass::class, false, false, null, $isNullable, $entity ? [$entity] : []);
394394
}
395395

396-
private function createRegistry(ObjectManager $manager = null): ManagerRegistry&MockObject
396+
private function createRegistry(?ObjectManager $manager = null): ManagerRegistry&MockObject
397397
{
398398
$registry = $this->getMockBuilder(ManagerRegistry::class)->getMock();
399399

Tests/DoctrineTestHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ final class DoctrineTestHelper
3333
/**
3434
* Returns an entity manager for testing.
3535
*/
36-
public static function createTestEntityManager(Configuration $config = null): EntityManager
36+
public static function createTestEntityManager(?Configuration $config = null): EntityManager
3737
{
3838
if (!\extension_loaded('pdo_sqlite')) {
3939
TestCase::markTestSkipped('Extension pdo_sqlite is required.');

0 commit comments

Comments
 (0)