On Fri, Nov 12, 2021 at 5:25 PM Ben Ramsey <ram...@php.net> wrote: > > On Nov 12, 2021, at 10:10, Derick Rethans <der...@php.net> wrote: > > > > On 12 November 2021 13:07:42 GMT, Nikita Popov <nikita....@gmail.com> > wrote: > >> Hi internals, > >> > >> I've opened the vote on > >> https://wiki.php.net/rfc/deprecate_dynamic_properties. Voting will > close > >> 2021-11-26. > > > > I've voted no on this one. Not because I don't like the idea, but > because I think the timeline for deprecation and removal is way too fast. > > > > This is IMO not something important enough to cause a fairly large BC > break for, and it should wait until the last in the 8.x series before we > deprecate it. > > > > cheers > > Derick > > > I’ve voted no for the same reason. > > I like this change, but the deprecation in 8.2 seems too disruptive. I’d > rather promote our intent to deprecate this with a statement in the > manual that says something like, “This feature will be deprecated in > PHP 8.3 and removed in 9.0.”
FWIW I think we should always deprecate things as soon as possible, to give people the maximum amount of awareness and time to address the issue before the actual removal occurs. Most people will not be aware they need to take action if it's just a note in the manual. For that reason, I find it generally preferable to deprecate something closer to PHP 8.0 than to 8.4, which would be directly before a major version with limited time to act. Now, we don't usually tend to optimize for "time of deprecation" because that requires planning deprecations many years in advance, but if the choice existed I'd always go for deprecating early in the major release cycle, rather than late. > Meanwhile, 8.2 should include the > AllowDynamicProperties attribute so folks can start preparing. > Given how attributes in PHP work, this doesn't make sense to me. You can already use #[AllowDynamicProperties] in your code right now, without any special support from PHP. Only static analyzers / IDEs need to know that they shouldn't complain about it even on versions where it does not technically exist. Regards, Nikita