pinterest-for-woocommerce icon indicating copy to clipboard operation
pinterest-for-woocommerce copied to clipboard

PHP 8.2 - Deprecated and Warning

Open layoutd opened this issue 1 year ago • 0 comments

Describe the bug:

While compatibility testing for WooCommerce 8.2 ( #823), I came across the following PHP 8.2 warnings:

PHP Deprecated:  Automatic conversion of false to array is deprecated in /…/pinterest-for-woocommerce/class-pinterest-for-woocommerce.php on line 546
PHP Deprecated:  Automatic conversion of false to array is deprecated in /…/pinterest-for-woocommerce/class-pinterest-for-woocommerce.php on line 600
PHP Deprecated:  Automatic conversion of false to array is deprecated in /…/pinterest-for-woocommerce/class-pinterest-for-woocommerce.php on line 1059
PHP Deprecated:  Automatic conversion of false to array is deprecated in /…/woocommerce/src/Admin/DataSourcePoller.php on line 138
PHP Deprecated:  Use of "parent" in callables is deprecated in /…/pinterest-for-woocommerce/src/Admin/Tasks/Onboarding.php on line 86
PHP Deprecated:  Use of "self" in callables is deprecated in /…/pinterest-for-woocommerce/src/ProductsXmlFeed.php on line 286
PHP Warning:  Undefined array key "is_billing_setup" in /…/pinterest-for-woocommerce/class-pinterest-for-woocommerce.php on line 982
PHP Warning:  Undefined array key "is_billing_setup" in /…/pinterest-for-woocommerce/src/Billing.php on line 60
PHP Warning:  Undefined array key "path" in /…/pinterest-for-woocommerce/src/API/Base.php on line 397

Steps to reproduce:

  1. Install on a store with PHP 8.2+.
  2. Enable WP_DEBUG, WP_DEBUG_LOGGING.
  3. Go through smoke testing steps: https://github.com/woocommerce/pinterest-for-woocommerce/wiki/Smoke-Tests
  4. Check the logs for messages.

Expected behavior:

Full PHP 8.2 compatibility.

Actual behavior:

Some deprecated features used.

layoutd avatar Oct 06 '23 13:10 layoutd