File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/main/php/lang/reflection Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,9 @@ public function modifiers($hook= null) {
7474 */
7575 public function get (?object $ instance ) {
7676 try {
77+
78+ // TODO: Remove superfluous call to setAccessible() if on PHP8.1+
79+ // see https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
7780 $ this ->reflect ->setAccessible (true );
7881 return $ this ->reflect ->getValue ($ instance );
7982 } catch (ReflectionException $ e ) {
@@ -94,6 +97,9 @@ public function get(?object $instance) {
9497 */
9598 public function set (?object $ instance , $ value ) {
9699 try {
100+
101+ // TODO: Remove superfluous call to setAccessible() if on PHP8.1+
102+ // see https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
97103 $ this ->reflect ->setAccessible (true );
98104 $ this ->reflect ->setValue ($ instance , $ value );
99105 return $ value ;
You can’t perform that action at this time.
0 commit comments