Skip to content
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 PHP 8.2 deprecation notice in WooCommerce\Orders. #3507

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

mwidmann
Copy link
Contributor

Fixes a deprecation notice because the $index property is undeclared in ElasticPress\Feature\WooCommerce\Orders and created dynamically.

Changelog Entry

Declared property $index in Orders.php in order to avoid the deprecation notice in PHP 8.2.

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

Fixes a deprecation notice because the `index` property is undeclared and created dynamically.
@mwidmann mwidmann changed the title Update Orders.php Fix PHP 8.2 deprecation notice in WooCommerce\Orders. Jun 21, 2023
@felipeelia
Copy link
Member

Thanks @mwidmann. Do you mind making it protected instead of private? Then we can have that merged and released in EP 4.6.1.

Setting visibility of `$index` to  protected as requested by @felipeelia .
@mwidmann
Copy link
Contributor Author

@felipeelia thanks for the feedback and the inclusion of this in a future release. I updated as requested.

@felipeelia felipeelia merged commit 530d8e8 into 10up:develop Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Deprecated: Creation of dynamic property ElasticPress\Feature\WooCommerce\Orders::$index
2 participants