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.1 - PHP Deprecated Warning: AbstractDatabase::current() ReturnTypeWillChange #53

Closed
stevenjcarr opened this issue Jan 17, 2022 · 1 comment

Comments

@stevenjcarr
Copy link

$ php composer.phar info | grep iso
sokil/php-isocodes 4.0.1 ISO country, subdivision, language, currency and scri...
sokil/php-isocodes-db-i18n 4.0.1 Database and internationalisation filed for ISO count...

$ php -v
PHP 8.1.1 (cli) (built: Dec 17 2021 23:49:52) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.1, Copyright (c) Zend Technologies
with Zend OPcache v8.1.1, Copyright (c), by Zend Technologies


When running one of my scripts I'm getting the deprecation message below when executing the following command:

$country = ((new IsoCodesFactory())->getCountries()->getByAlpha2($countryCode));

PHP Deprecated: Return type of Sokil\IsoCodes\AbstractDatabase::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ***/vendor/sokil/php-isocodes/src/AbstractDatabase.php on line 182

@sokil
Copy link
Owner

sokil commented Jan 25, 2022

Released in v.4.0.2

@sokil sokil closed this as completed Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants