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 @@ -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 ;
You can’t perform that action at this time.
0 commit comments