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

Deprecated Warning: Dynamic Property Creation in Oxygen Plugin #3600

Open
seierup opened this issue Nov 29, 2024 · 0 comments
Open

Deprecated Warning: Dynamic Property Creation in Oxygen Plugin #3600

seierup opened this issue Nov 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@seierup
Copy link

seierup commented Nov 29, 2024

I'm encountering multiple deprecation warnings in the Oxygen Gutenberg and Oxygen WooCommerce plugins due to the creation of dynamic properties. These warnings occur since PHP 8.2 deprecated dynamic property creation, which affects compatibility.

Error Log:

PHP Deprecated: Creation of dynamic property OxygenGutenbergPluginUpdater::$prefix is deprecated in /wp-content/plugins/oxygen-gutenberg/admin/includes/updater/edd-updater.php on line 19
PHP Deprecated: Creation of dynamic property OxyWooCommerce::$buttons_settings is deprecated in /wp-content/plugins/oxygen-woocommerce/OxyWooCommerce.php on line 40
...

The issue occurs across multiple files, including:

  • oxygen-gutenberg/admin/includes/updater/edd-updater.php
  • oxygen-woocommerce/OxyWooCommerce.php

Steps to Reproduce:

  • PHP 8.2.
  • Activate the Oxygen Gutenberg and Oxygen WooCommerce plugins.
  • Observe the PHP deprecation warnings in the error log.
  • Expected Behavior: The plugins should be compatible with PHP 8.2 without triggering deprecated warnings.

Proposed Solution: Replace dynamic property assignment with properly defined class properties to ensure compatibility with PHP 8.2.

Environment:

WordPress Version: 6.7.1
PHP Version: 8.2
Plugin Versions:

  • Oxygen Version: 4.9.1
  • Oxygen Gutenberg Version: 1.4.5
  • Oxygen WooCommerce Version: 2.0.1
@seierup seierup added the bug Something isn't working label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant