Migrate SOAP table resource to array#14174
Conversation
|
An array does seem to make sense here, rather than an object. The readonly modifier would be nice but I suppose this can always be discussed on the internals ML. |
ndossche
left a comment
There was a problem hiding this comment.
Makes a lot of sense to me. Thanks! I like that the number of lines even decreases.
I wonder why it wasn't simply an array in the first place. I guess it wasn't because maybe this predates private properties?
Yeah, I was also wondering about it.. My guess was that it had been implemented like that to achieve immutability (that's why I was thinking about adding the readonly modifier) 🤔 But I don't know.. Thank you all for the quick reviews! :) One less extension uses resources! |
I was not sure if we really have to convert the
SOAP tableresource as an object, I rather chose an array. It could also bereadonly, but that would mean the constructor cannot be called twice, so I opted for not adding this modifier for now.Related to https://wiki.php.net/rfc/resource_to_object_conversion and php/php-tasks#6