Re: [Vote] make Reflection*#setAccessible() no-op
| From: | Marco Pivetta | Date: | Wed, 07 Jul 2021 14:00:11 +0000 |
| Subject: | Re: [Vote] make Reflection*#setAccessible() no-op | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-115351@lists.php.net to get a copy of this message | ||
Hey y'all,
I'm closing the vote for making
Reflection*#setAccessible() no-op.
The result is a unanimous 31 votes **for** the change to be included in PHP
8.1: I will clean up https://github.com/php/php-src/pull/5412 and get
it
ready for merge :-)
@Tyson sorry, I really forgot to update the RFC with any further feedback
there, and only checked again today as per a calendar entry I created for
this.
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/
On Thu, Jun 24, 2021 at 1:20 AM tyson andre <tysonandre775@hotmail.com>
wrote:
> 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
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
>
>