Skip to content

Commit 0161608

Browse files
authored
Fix phpGH-10259 ReflectionClass::getStaticProperties doesn't need null return type (php#10418)
1 parent ec23f28 commit 0161608

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ PHP NEWS
8686
- Reflection:
8787
. Fix GH-9470 (ReflectionMethod constructor should not find private parent
8888
method). (ilutov)
89+
. Fix GH-10259 (ReflectionClass::getStaticProperties doesn't need null return
90+
type). (kocsismate)
8991

9092
- Sockets:
9193
. Added SO_ATTACH_REUSEPORT_CBPF socket option, to give tighter control

UPGRADING

+3
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ PHP 8.3 UPGRADE NOTES
9696
a random seed, 0 will use zero as the seed. The functions are now consistent
9797
with Mt19937::__construct().
9898

99+
- Reflection:
100+
. Return type of ReflectionClass::getStaticProperties() is no longer nullable.
101+
99102
- Sockets:
100103
. Added socket_atmark to checks if the socket is OOB marked.
101104

ext/reflection/php_reflection.stub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public function getParentClass(): ReflectionClass|false {}
404404
public function isSubclassOf(ReflectionClass|string $class): bool {}
405405

406406
/** @tentative-return-type */
407-
public function getStaticProperties(): ?array {}
407+
public function getStaticProperties(): array {}
408408

409409
/** @tentative-return-type */
410410
public function getStaticPropertyValue(string $name, mixed $default = UNKNOWN): mixed {}

ext/reflection/php_reflection_arginfo.h

+2-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/reflection/tests/ReflectionClass_toString_001.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ Class [ <internal:Reflection> class ReflectionClass implements Stringable, Refle
349349

350350
- Parameters [0] {
351351
}
352-
- Tentative return [ ?array ]
352+
- Tentative return [ array ]
353353
}
354354

355355
Method [ <internal:Reflection> public method getStaticPropertyValue ] {

0 commit comments

Comments
 (0)