alcohol / iso3166

A PHP library providing ISO 3166-1 data.
https://iso3166.thephpleague.com
MIT License
640 stars 59 forks source link

New release to prevent deprecations triggered on PHP 8.1 #75

Closed christian-kolb closed 1 year ago

christian-kolb commented 1 year ago

I get the following deprecations using version 3.0.0.

[2022-07-13T09:21:55.671686+00:00] php.INFO: Deprecated: Return type of League\ISO3166\ISO3166::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"exception":"[object] (ErrorException(code: 0): Deprecated: Return type of League\\ISO3166\\ISO3166::count() should either be compatible with Countable::count(): int, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/html/vendor/league/iso3166/src/ISO3166.php:111)"} []
[2022-07-13T09:21:55.672165+00:00] php.INFO: Deprecated: Return type of League\ISO3166\ISO3166::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"exception":"[object] (ErrorException(code: 0): Deprecated: Return type of League\\ISO3166\\ISO3166::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/html/vendor/league/iso3166/src/ISO3166.php:123)"} []

According to the commit history, this was already fixed on 19.10.2021 but there hasn't been a release since 05.12.2020. Is it possible to trigger a new bugfix release like 3.0.1 that includes this?

techi602 commented 1 year ago

Yep, I had to change composer version to dev-main "league/iso3166": "dev-main",

alcohol commented 1 year ago

I am a little bit confused. The fixes you are looking for are available as of 4.0.0. So why not upgrade to said version?

christian-kolb commented 1 year ago

@alcohol Because there is no release with 4.0.0. I just looked into more details and realized that there is a version that is tagged as 4.0.0 and it's also available in Packagist. I looked into the releases where it can't be found and didn't think of looking anywhere else 😄 As I'm not the only one stumbling over it, it would be great if it's also listed in the releases.

alcohol commented 1 year ago

Ah, I must have forgotten to do that. Thanks for the reminder.