Re: [Vote] make Reflection*#setAccessible() no-op

From: Date: Wed, 23 Jun 2021 23:20:26 +0000
Subject: Re: [Vote] make Reflection*#setAccessible() no-op
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-115084@lists.php.net to get a copy of this message
Mi Marco Pivetta, > I'm opening the vote for making > Reflection*#setAccessible(). > > Voting starts today (2021-06-23) and ends in 14 days (2021-07-07). > > Vote at > https://wiki.php.net/rfc/make-reflection-setaccessible-no-op > > Discussion: > https://marc.info/?l=php-internals&m=162360269505048&w=2 > > Discussion^2: https://externals.io/message/114841 I'm in favor of this even without adding isAccessible(), but just to note: https://wiki.php.net/rfc/howto mentions: > Listen to the feedback, and try to answer/resolve all questions. > **Update your RFC to document all the issues and discussions. > Cover both the positive and negative arguments.** Put the RFC URL into all your replies. 1. This should probably link to the RFC discussions in a References section, not everyone who votes reads the mailing list. 2. https://externals.io/message/114841#114845 is the only thing that resembled an objection for a "Discussion" section or future scope, though > I think that isAccessible should be added if any applications actually did depend on > ReflectionException > being thrown for correctness - they could throw their own exception if isAccessible was > false. > (e.g. for code meant to handle possibly undefined public typed properties by checking for > initialization > then getting the value) > > I can't actually remember needing this (anything other than setAccessible(true)) > personally, though, since $obj->{$method}(...$args) could be > used. > I've only used this to access private and protected properties/methods.. Thanks, Tyson

« previous php.internals (#115084) next »