Skip to content

Commit d4d908b

Browse files
Merge branch '5.4' into 6.3
* 5.4: 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 cf63a86 + f1c8d1f commit d4d908b

19 files changed

+165
-30
lines changed

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($eventName, EventArgs $eventArgs = null): void
47+
public function dispatchEvent($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
@@ -58,7 +58,7 @@ public function addLogger(string $name, DebugStack $logger)
5858
/**
5959
* @return void
6060
*/
61-
public function collect(Request $request, Response $response, \Throwable $exception = null)
61+
public function collect(Request $request, Response $response, ?\Throwable $exception = null)
6262
{
6363
$this->data = [
6464
'queries' => $this->collectQueries(),

DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ protected function setMappingDriverConfig(array $mappingConfig, string $mappingN
141141
*
142142
* Returns false when autodetection failed, an array of the completed information otherwise.
143143
*/
144-
protected function getMappingDriverBundleConfigDefaults(array $bundleConfig, \ReflectionClass $bundle, ContainerBuilder $container, string $bundleDir = null): array|false
144+
protected function getMappingDriverBundleConfigDefaults(array $bundleConfig, \ReflectionClass $bundle, ContainerBuilder $container, ?string $bundleDir = null): array|false
145145
{
146146
$bundleClassDir = \dirname($bundle->getFileName());
147147
$bundleDir ??= $bundleClassDir;
@@ -451,7 +451,7 @@ abstract protected function getMappingObjectDefaultName(): string;
451451
/**
452452
* Relative path from the bundle root to the directory where mapping files reside.
453453
*/
454-
abstract protected function getMappingResourceConfigDirectory(string $bundleDir = null): string;
454+
abstract protected function getMappingResourceConfigDirectory(?string $bundleDir = null): string;
455455

456456
/**
457457
* Extension used by the mapping files.

Form/ChoiceList/DoctrineChoiceLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class DoctrineChoiceLoader extends AbstractChoiceLoader
3636
*
3737
* @param string $class The class name of the loaded objects
3838
*/
39-
public function __construct(ObjectManager $manager, string $class, IdReader $idReader = null, EntityLoaderInterface $objectLoader = null)
39+
public function __construct(ObjectManager $manager, string $class, ?IdReader $idReader = null, ?EntityLoaderInterface $objectLoader = null)
4040
{
4141
$classMetadata = $manager->getClassMetadata($class);
4242

Form/ChoiceList/IdReader.php

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

IdGenerator/UlidGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class UlidGenerator extends AbstractIdGenerator
2121
{
2222
private ?UlidFactory $factory;
2323

24-
public function __construct(UlidFactory $factory = null)
24+
public function __construct(?UlidFactory $factory = null)
2525
{
2626
$this->factory = $factory;
2727
}

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);

Logger/DbalLogger.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ class DbalLogger implements SQLLogger
2626
protected $logger;
2727
protected $stopwatch;
2828

29-
public function __construct(LoggerInterface $logger = null, Stopwatch $stopwatch = null)
29+
public function __construct(?LoggerInterface $logger = null, ?Stopwatch $stopwatch = null)
3030
{
3131
$this->logger = $logger;
3232
$this->stopwatch = $stopwatch;
3333
}
3434

35-
public function startQuery($sql, array $params = null, array $types = null): void
35+
public function startQuery($sql, ?array $params = null, ?array $types = null): void
3636
{
3737
$this->stopwatch?->start('doctrine', 'doctrine');
3838

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;
2929
protected $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
@@ -29,7 +29,7 @@ class DoctrineOpenTransactionLoggerMiddleware extends AbstractDoctrineMiddleware
2929
/** @var bool */
3030
private $isHandling = false;
3131

32-
public function __construct(ManagerRegistry $managerRegistry, string $entityManagerName = null, LoggerInterface $logger = null)
32+
public function __construct(ManagerRegistry $managerRegistry, ?string $entityManagerName = null, ?LoggerInterface $logger = null)
3333
{
3434
parent::__construct($managerRegistry, $entityManagerName);
3535

0 commit comments

Comments
 (0)