Essentially the same thing here. Removal of dynamic properties will be the next 
big one for my team. It's the deprecations that hit huge swaths of code without 
really offering much benefit that are annoying.

Yes, we have a _lot_ of classes. Also multiple versions of Zend framework that 
we backport to. However, I see in a subsequent email that this is in 
preparation for improvements, which makes it more tolerable.

To clarify; Are you saying that you have a _lot_ of classes _which make use of 
dynamic properties_?  A class where properties are predefined is unimpacted by 
this.  stdClass is also unimpacted (as it implicitly has 
allowdynamicproperties).  The only classes you should need to add the attribute 
to are ones where you're using them, essentially, as typed associative arrays.

I'm surprised if that's what you have, because it seems like a lot of extra 
effort to give names to what are essentially anonymous structures.  The 
advantage of providing a name should be that you get to know what properties 
will be present (and perhaps that the values therein are validated or typed 
themselves).

Can you expand a bit more on your use-case?

We have a lot of classes, a small portion of which use dynamic properties, but 
we do not necessarily know which ones do. It’s different than, for example, a 
change to the count function. We can search for all instances of “count” but 
not for dynamic properties. I’m unsure if it’s practical to run deprecations on 
in prod and our test suite, although substantial, doesn’t cover all code paths. 
I’d probably summarize our use case for dynamic properties as “old codebase and 
dynamic properties were OK”. Our system was originally in Perl, so the initial 
dev team probably felt at home with dynamic properties coming from Perl objects.
But again, after reading others’ comments stating that this is part of an 
effort to improve some aspect of PHP classes, we can live with the change.
I was recently looking at the Perl 5.x repo and was surprised at the amount of 
activity. There may be some small takeaway (like, literally a small takeaway, 
not in the “small meaning big” sense) in how the 5.x community has seemingly 
flourished, especially considering the failure of Perl 6.
-Jeff (and I apologize for the mauled quoting... Outlook, annoying mailing 
lists since forever)

Reply via email to