Skip to content

Commit a8c12b5

Browse files
Merge branch '6.3' into 6.4
* 6.3: 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
2 parents 5fe9a00 + ea6fe0e commit a8c12b5

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|array $initializer, array $skippedProperties = null, object $instance = null): static
34+
public static function createLazyGhost(\Closure|array $initializer, ?array $skippedProperties = null, ?object $instance = null): static
3535
{
3636
if (\is_array($initializer)) {
3737
trigger_deprecation('symfony/var-exporter', '6.4', 'Per-property lazy-initializers are deprecated and won\'t be supported anymore in 7.0, use an object initializer instead.');

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
@@ -445,7 +445,7 @@ public function testReadOnlyClass()
445445
*
446446
* @return T
447447
*/
448-
private function createLazyGhost(string $class, \Closure|array $initializer, array $skippedProperties = null): object
448+
private function createLazyGhost(string $class, \Closure|array $initializer, ?array $skippedProperties = null): object
449449
{
450450
$r = new \ReflectionClass($class);
451451

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)