Skip to content

Commit dd6fb3c

Browse files
authored
fix: Fix php 8.4 deprecations in unit tests (#672)
1 parent b0803e8 commit dd6fb3c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/Unit/Declaration/Fixture/FixedReader.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
class FixedReader implements ReaderInterface
2020
{
21-
public function getClassMetadata(\ReflectionClass $class, string $name = null): iterable
21+
public function getClassMetadata(\ReflectionClass $class, ?string $name = null): iterable
2222
{
2323
return [];
2424
}
@@ -36,7 +36,7 @@ public function firstClassMetadata(\ReflectionClass $class, string $name): ?obje
3636
return null;
3737
}
3838

39-
public function getFunctionMetadata(\ReflectionFunctionAbstract $function, string $name = null): iterable
39+
public function getFunctionMetadata(\ReflectionFunctionAbstract $function, ?string $name = null): iterable
4040
{
4141
return [];
4242
}
@@ -50,7 +50,7 @@ public function firstFunctionMetadata(\ReflectionFunctionAbstract $function, str
5050
return null;
5151
}
5252

53-
public function getPropertyMetadata(\ReflectionProperty $property, string $name = null): iterable
53+
public function getPropertyMetadata(\ReflectionProperty $property, ?string $name = null): iterable
5454
{
5555
return [];
5656
}
@@ -60,7 +60,7 @@ public function firstPropertyMetadata(\ReflectionProperty $property, string $nam
6060
return null;
6161
}
6262

63-
public function getConstantMetadata(\ReflectionClassConstant $constant, string $name = null): iterable
63+
public function getConstantMetadata(\ReflectionClassConstant $constant, ?string $name = null): iterable
6464
{
6565
return [];
6666
}
@@ -70,7 +70,7 @@ public function firstConstantMetadata(\ReflectionClassConstant $constant, string
7070
return null;
7171
}
7272

73-
public function getParameterMetadata(\ReflectionParameter $parameter, string $name = null): iterable
73+
public function getParameterMetadata(\ReflectionParameter $parameter, ?string $name = null): iterable
7474
{
7575
return [];
7676
}

tests/Unit/Worker/AutowiringTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static function reflectionDataProvider(): array
4242
static::class . '->instanceMethod' => [new \ReflectionMethod($instance, 'instanceMethod')],
4343

4444
// Static Method
45-
static::class . '::staticMethod' => [new \ReflectionMethod(static::class . '::staticMethod')],
45+
static::class . '::staticMethod' => [new \ReflectionMethod(static::class, 'staticMethod')],
4646

4747
// Function
4848
__NAMESPACE__ . '\\global_function' => [new \ReflectionFunction(__NAMESPACE__ . '\\global_function')],

0 commit comments

Comments
 (0)