-
Notifications
You must be signed in to change notification settings - Fork 11
["BUG"] Creation of dynamic property #106
Copy link
Copy link
Closed
Labels
bugReport of or fix for something that isn't working as intendedReport of or fix for something that isn't working as intendedhelp wantedReady to be picked up by anyone in the communityReady to be picked up by anyone in the community
Description
Describe the bug
We are adding a property not defined in the class in the first place. In PHP, they call it a dynamic property.
Since PHP 8.2 generates a deprecation warning. For PHP 9, that could cause a fatal error.
[09-Dec-2024 21:40:55 UTC] PHP Deprecated: Creation of dynamic property OpenedX_Commerce\model\Openedx_Commerce_Enrollment::$parent is deprecated in /var/www/html/wp-content/plugins/openedx-commerce/includes/model/class-openedx-commerce-enrollment.php on line 58
Deprecated: Creation of dynamic property OpenedX_Commerce\model\Openedx_Commerce_Enrollment::$parent is deprecated in /var/www/html/wp-content/plugins/openedx-commerce/includes/model/class-openedx-commerce-enrollment.php on line 58To Reproduce
I found that warning in the Plugin check workflow.
Example: https://github.com/openedx/openedx-wordpress-ecommerce/actions/runs/12168160490/job/34157245826?pr=104
Expected behavior
Don't have dynamic properties.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugReport of or fix for something that isn't working as intendedReport of or fix for something that isn't working as intendedhelp wantedReady to be picked up by anyone in the communityReady to be picked up by anyone in the community