Skip to content

Commit 1fb7930

Browse files
Merge branch '6.4' into 7.0
* 6.4: 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 345c62f + a8c12b5 commit 1fb7930

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

Exception/ClassNotFoundException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class ClassNotFoundException extends \Exception implements ExceptionInterface
1515
{
16-
public function __construct(string $class, \Throwable $previous = null)
16+
public function __construct(string $class, ?\Throwable $previous = null)
1717
{
1818
parent::__construct(sprintf('Class "%s" not found.', $class), 0, $previous);
1919
}

Exception/NotInstantiableTypeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class NotInstantiableTypeException extends \Exception implements ExceptionInterface
1515
{
16-
public function __construct(string $type, \Throwable $previous = null)
16+
public function __construct(string $type, ?\Throwable $previous = null)
1717
{
1818
parent::__construct(sprintf('Type "%s" is not instantiable.', $type), 0, $previous);
1919
}

LazyGhostTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ trait LazyGhostTrait
3131
* that the initializer doesn't initialize, if any
3232
* @param static|null $instance
3333
*/
34-
public static function createLazyGhost(\Closure $initializer, array $skippedProperties = null, object $instance = null): static
34+
public static function createLazyGhost(\Closure $initializer, ?array $skippedProperties = null, ?object $instance = null): static
3535
{
3636
if (self::class !== $class = $instance ? $instance::class : static::class) {
3737
$skippedProperties["\0".self::class."\0lazyObjectState"] = true;

LazyProxyTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ trait LazyProxyTrait
2727
* @param \Closure():object $initializer Returns the proxied object
2828
* @param static|null $instance
2929
*/
30-
public static function createLazyProxy(\Closure $initializer, object $instance = null): static
30+
public static function createLazyProxy(\Closure $initializer, ?object $instance = null): static
3131
{
3232
if (self::class !== $class = $instance ? $instance::class : static::class) {
3333
$skippedProperties = ["\0".self::class."\0lazyObjectState" => true];

ProxyHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class);
213213
EOPHP;
214214
}
215215

216-
public static function exportSignature(\ReflectionFunctionAbstract $function, bool $withParameterTypes = true, string &$args = null): string
216+
public static function exportSignature(\ReflectionFunctionAbstract $function, bool $withParameterTypes = true, ?string &$args = null): string
217217
{
218218
$byRefIndex = 0;
219219
$args = '';
@@ -270,7 +270,7 @@ public static function exportSignature(\ReflectionFunctionAbstract $function, bo
270270
return $signature;
271271
}
272272

273-
public static function exportType(\ReflectionFunctionAbstract|\ReflectionProperty|\ReflectionParameter $owner, bool $noBuiltin = false, \ReflectionType $type = null): ?string
273+
public static function exportType(\ReflectionFunctionAbstract|\ReflectionProperty|\ReflectionParameter $owner, bool $noBuiltin = false, ?\ReflectionType $type = null): ?string
274274
{
275275
if (!$type ??= $owner instanceof \ReflectionFunctionAbstract ? $owner->getReturnType() : $owner->getType()) {
276276
return null;

Tests/LazyGhostTraitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public function testReadOnlyClass()
247247
*
248248
* @return T
249249
*/
250-
private function createLazyGhost(string $class, \Closure $initializer, array $skippedProperties = null): object
250+
private function createLazyGhost(string $class, \Closure $initializer, ?array $skippedProperties = null): object
251251
{
252252
$r = new \ReflectionClass($class);
253253

VarExporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ final class VarExporter
3737
*
3838
* @throws ExceptionInterface When the provided value cannot be serialized
3939
*/
40-
public static function export(mixed $value, bool &$isStaticValue = null, array &$foundClasses = []): string
40+
public static function export(mixed $value, ?bool &$isStaticValue = null, array &$foundClasses = []): string
4141
{
4242
$isStaticValue = true;
4343

0 commit comments

Comments
 (0)