-
Notifications
You must be signed in to change notification settings - Fork 75
PHP 8.2 Migration Prep: add dyn properties #2040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 8.2 Migration Prep: add dyn properties #2040
Conversation
As of PHP 8.2 dynamically creating properties has been deprecated ( https://php.watch/versions/8.2/dynamic-properties-deprecated ). As the changes to support this are compatible with PHP 7.4 this PR can be merged prior to the main 7.4 -> 8.2 upgrade.
|
I'll approve this but I would really like appropriate comments added for each of the properties. I know that's a bit of a pain but I think it will be helpful. |
|
@eiffel777 I mean, I can give go through and try and do basics like, add expected types and what it looks like the properties purpose is, but doing a 100% deep dive into each property and it's purpose is outside the scope of this particular PR. |
Yeah, having at least the type would be helpful. I'm fine with that. |
Description
These changes were derived from the composer library
rector/rectorwhich helps identify php code that matches specific rules / sets of rules. In this case the rule used was the "Complete Dynamic Properties" https://getrector.com/rule-detail/complete-dynamic-properties-rector .NOTE: If you dry-run that rule on a freshly checked out XDMoD repo it will include some white space modifications. I have not included those changes in this PR
Motivation and Context
As of PHP 8.2 dynamically creating properties for an object has been deprecated ( https://php.watch/versions/8.2/dynamic-properties-deprecated ). As the changes to support this are compatible with PHP 7.4 this PR can be merged prior to the main 7.4 -> 8.2 upgrade.
Tests performed
All automated tests have been run locally.
Checklist: