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
Deprecated creation of dynamic properties #38857
Comments
We are adding the Thank you for your patience. |
@samueljseay I understand that most often issues require reproduction. However this is not the case hare. It's just about two properties missing declaration. A static analysis of the code is sufficient to aknowledge and fix the issue. |
@Chouby absolutely, this is more of a triaging process thing from our perspective when we receive community contributed issues. Confirmation the bug or issue still exists so we can prioritize it may indeed involve just running static analysis tools to confirm the problem :) |
@Chouby I ran the unit tests with |
@samueljseay |
@samueljseay I re-read my comment from Aug. I should have included that I did test with PHP 8.2.
Are you seeing these running unit tests? |
As a part of this repository's maintenance, this issue is being marked as stale due to inactivity. Please feel free to comment on it in case we missed something. After 7 days with no activity this issue will be automatically be closed. |
I'm pretty sure this issue should not me marked as stale. |
@pogla Can you provide the steps needed to reproduce the issue? Here's the log from running the tests today with the section listing the skipped tests removed:
|
As a part of this repository's maintenance, this issue is being marked as stale due to inactivity. Please feel free to comment on it in case we missed something. After 7 days with no activity this issue will be automatically be closed. |
The function call here is |
@rrennick Just following up on this issue as I'm able to reproduce with the latest version of trunk as well. It was initially discovered while running AutomateWoo unit tests. I'm actually getting 4 deprecation notices:
Steps to reproduce:
Running the unit tests included with WooCommerce is not sufficient because it explicitly turns off deprecation notices here: https://github.com/woocommerce/woocommerce/blob/8.4.0/plugins/woocommerce/tests/legacy/bootstrap.php#L98
If I run all the tests I get a lot more deprecation notices, but these are the ones I identified which can occur during a regular checkout and depending on configuration could block a checkout from completing. |
👋🏾 @mikkamp Is this issue still being worked on, or was it resolved within [#1657]? (https://github.com/woocommerce/automatewoo/pull/1657) One of our third-party developers is still experiencing this issue:
|
The issue https://github.com/woocommerce/automatewoo/pull/1657 only addresses making the AutomateWoo code compatible with PHP 8.3. The notices in WooCommerce core still need to be addressed in this issue. |
@jdevieux for the record, that specific error going to be fixed in #43872 if it ends up getting reviewed and merged as it got in the way of that PR. You might want to keep an eye on the PR's progress ;) |
for the record, also reported in #44621 |
The `\WC_Checkout::create_order_line_items` method assigns values to properties of the `WC_Order_Item_Product` class which did not exist. PHP Deprecated: Creation of dynamic property WC_Order_Item_Product::$legacy_values PHP Deprecated: Creation of dynamic property WC_Order_Item_Product::$legacy_cart_item_key Fixes #38857 --------- Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
The `\WC_Checkout::create_order_line_items` method assigns values to properties of the `WC_Order_Item_Product` class which did not exist. PHP Deprecated: Creation of dynamic property WC_Order_Item_Product::$legacy_values PHP Deprecated: Creation of dynamic property WC_Order_Item_Product::$legacy_cart_item_key Fixes #38857 --------- Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Prerequisites
Describe the bug
Running PHPUnit tests with WC 7.9 beta 1 + PHP 8.2, deprecated notices are logged:
Expected behavior
No deprecated notice
Actual behavior
N/A
Steps to reproduce
N/A (Im' running private PHPUnit tesfs)
WordPress Environment
WP 6.2
WC 7.9 beta 1
PHP 8.2
Isolating the problem
The text was updated successfully, but these errors were encountered: