-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Fix deprecation of dynamic properties #16440
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Define magic method __set and __get in the class to avoid the deprecation message. See: https://php.watch/versions/8.2/dynamic-properties-deprecated#__get-__set
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## 3.x #16440 +/- ##
=========================================
Coverage 21.73% 21.73%
Complexity 10482 10482
=========================================
Files 561 561
Lines 31612 31612
=========================================
Hits 6872 6872
Misses 24740 24740
☔ View full report in Codecov by Sentry. |
Mark-H
approved these changes
Aug 4, 2023
rthrash
added
the
pr/ready-for-merging
Pull request reviewed and tested and ready for merging.
label
Sep 29, 2023
opengeek
added a commit
that referenced
this pull request
Oct 2, 2023
* Fix deprecation of dynamic properties Define magic method __set and __get in the class to avoid the deprecation message. See: https://php.watch/versions/8.2/dynamic-properties-deprecated#__get-__set * Fix 'Cannot assign by reference to overloaded object' * Use AllowDynamicProperties attribute instead of __get()/__set() --------- Co-authored-by: Jason Coward <jason@opengeek.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cla-signed
CLA confirmed for contributors to this PR.
pr/ready-for-merging
Pull request reviewed and tested and ready for merging.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does it do?
Define magic method __set and __get in the class to avoid the deprecation message. See: https://php.watch/versions/8.2/dynamic-properties-deprecated#__get-__set
There is also a fix included for an uncaught error:
Cannot assign by reference to overloaded object in /core/src/Revolution/Hashing/modHashing.php:107
.Why is it needed?
Avoid the message
Creation of dynamic property MODX\Revolution\Hashing\modHashing::$native is deprecated in core/src/Revolution/Hashing/modHashing.php on line 107
How to test
Those messages seem to occur during installing MODX 3.0.3 on PHP 8.2. See the screenshot from Slack:
There are other similar issues xPDO and modAccessibleObject that screenshot.
Related issue(s)/PR(s)
None known