-
Notifications
You must be signed in to change notification settings - Fork 43
Release v6.0.0 #787
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
base: master
Are you sure you want to change the base?
Release v6.0.0 #787
Conversation
…$order object (#786) * Add Dynamic_Props class to store dynamic properties for order object. * Replace dynamic props usage with Dynamic_Props class. * Minor doc updates. * Docs improvements. * Update namespace to use v6_0_0 * Added "sv_wc_plugin_framework_use_dynamic_props_class" filter to make use of Dynamic_Props class opt-in only. * Add OrderHelper Class to simplify property get/set on order object. * Update OrderHelper methods to follow the WP case.
* Explicitly mark parameters as nullable * Update changelog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This is a major version release (v6.0.0) that introduces a significant architectural change to how dynamic properties are handled on WooCommerce order objects. The primary purpose is to address deprecated dynamic property usage in PHP 8.2+ while maintaining backward compatibility with older PHP versions.
Key Changes
- Introduces new
Dynamic_Propsclass for managing order properties with WeakMap (PHP 8.0+) and fallback to direct property access (PHP 7.4+) - Adds new
OrderHelperclass providing standardized methods for getting/setting order properties - Updates all framework classes from namespace
v5_15_12tov6_0_0
Reviewed Changes
Copilot reviewed 151 out of 160 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| woocommerce/payment-gateway/Dynamic_Props.php | New class for PHP 8.2+ compatible dynamic property storage |
| woocommerce/Helpers/OrderHelper.php | New helper class for standardized order property management |
| woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php | Updates to use new OrderHelper and Dynamic_Props classes |
| woocommerce/payment-gateway/integrations/* | Payment gateway integration classes updated for new property handling |
| woocommerce/payment-gateway/class-sv-wc-payment-gateway*.php | Core gateway classes updated to use Dynamic_Props |
| Various framework files | Namespace updates from v5_15_12 to v6_0_0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...mmerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php
Show resolved
Hide resolved
woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php
Show resolved
Hide resolved
* Use modern default flags for htmlspecialchars(). * Remove mixed type declarations for PHP 7.4 compat. * Explicitly mark parameters as nullable. * Ignore conditional use of WeakMap.
Summary
Major release v6.0.0
Stories
Before merge
woocommerce/changelog.txt