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

PHP 8.1 deprecated codes #1745

Closed
ned-bs opened this issue Nov 6, 2022 · 1 comment · Fixed by #1761
Closed

PHP 8.1 deprecated codes #1745

ned-bs opened this issue Nov 6, 2022 · 1 comment · Fixed by #1761
Labels
priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: technical debt This issue/PR represents/solves the technical debt of the project.

Comments

@ned-bs
Copy link

ned-bs commented Nov 6, 2022

Hi there,

I use PHP 8.1 and latest versions of WP and WC.
Here is the error I got with Qery monitor plugin.

Deprecated Return type of Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\ISO3166\ISO3166::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice 1
wp-content/plugins/google-listings-and-ads/vendor/league/iso3166/src/ISO3166.php:111
Plugin: google-listings-and-ads
Deprecated Return type of Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\ISO3166\ISO3166::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice 1
wp-content/plugins/google-listings-and-ads/vendor/league/iso3166/src/ISO3166.php:123
Plugin: google-listings-and-ads

@mikkamp
Copy link
Contributor

mikkamp commented Nov 7, 2022

Thanks for the report. Since the deprecation notice is coming from one of the libraries we use, it seems we'll need to update to a newer version.

It looks like this has been addressed in version 4.0.0 of the iso3166 library: https://github.com/thephpleague/iso3166/releases
We are still on version 3.0, so we'll need to upgrade to prevent the notice.

@mikkamp mikkamp added type: technical debt This issue/PR represents/solves the technical debt of the project. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. labels Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: technical debt This issue/PR represents/solves the technical debt of the project.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants