moneyphp / money

PHP implementation of Fowler's Money pattern.
http://moneyphp.org
MIT License
4.62k stars 440 forks source link

ISOCurrencies::getIterator needs return type to be specified #709

Closed OneHatRepo closed 2 years ago

OneHatRepo commented 2 years ago

Getting this error in PHP 8.1.10: "Return type of Money\Currencies\ISOCurrencies::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [in APP/vendor/moneyphp/money/src/Currencies/ISOCurrencies.php, line 62]"

So line 62 needs to read: public function getIterator(): \Traversable and the error goes awaay

frederikbosch commented 2 years ago

This is not an issue. There is no support for PHP 8.1 for Money v3. However, if you create a PR with the ReturnTypeWillChanged attribute added to the method, I will merge it and create a tag for you.