Skip to content

Commit fab6891

Browse files
committed
QA: Add TODO comment
1 parent 90d4dd5 commit fab6891

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/php/lang/reflection/Property.class.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public function constraint() {
4848
*/
4949
public function get(?object $instance) {
5050
try {
51+
52+
// TODO: Remove superfluous call to setAccessible() if on PHP8.1+
53+
// see https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
5154
$this->reflect->setAccessible(true);
5255
return $this->reflect->getValue($instance);
5356
} catch (ReflectionException $e) {
@@ -68,6 +71,9 @@ public function get(?object $instance) {
6871
*/
6972
public function set(?object $instance, $value) {
7073
try {
74+
75+
// TODO: Remove superfluous call to setAccessible() if on PHP8.1+
76+
// see https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
7177
$this->reflect->setAccessible(true);
7278
$this->reflect->setValue($instance, $value);
7379
return $value;

0 commit comments

Comments
 (0)