PHP 8.1 requires implementations of Iterator::key() to declare a return type. When not doing so, the notice is printed.
A simple workaround might be using the #[\ReturnTypeWillChange] attribute to suppress the error message; cf rARC3626582354e4fc62191927a80b274ec71284cb77.
Output from PHPStan:
- https://we.phorge.it/source/phorge/browse/master/src/applications/fact/extract/PhabricatorFactUpdateIterator.php$36
- Return type mixed of method PhabricatorFactUpdateIterator::key() is not covariant with tentative return type mixed of method Iterator::key(). Make it covariant, or use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.
- https://we.phorge.it/source/phorge/browse/master/src/applications/harbormaster/storage/build/HarbormasterBuildLogChunkIterator.php$21
- Return type mixed of method HarbormasterBuildLogChunkIterator::key() is not covariant with tentative return type mixed of method Iterator::key(). Make it covariant, or use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.
- https://we.phorge.it/source/phorge/browse/master/src/infrastructure/storage/lisk/LiskMigrationIterator.php$29
- Return type mixed of method LiskMigrationIterator::key() is not covariant with tentative return type mixed of method Iterator::key(). Make it covariant, or use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.
- https://we.phorge.it/source/phorge/browse/master/src/infrastructure/storage/lisk/LiskRawMigrationIterator.php$19
- Return type mixed of method LiskRawMigrationIterator::key() is not covariant with tentative return type mixed of method Iterator::key(). Make it covariant, or use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.
- https://we.phorge.it/source/phorge/browse/master/src/infrastructure/storage/lisk/PhabricatorQueryIterator.php$21
- Return type mixed of method PhabricatorQueryIterator::key() is not covariant with tentative return type mixed of method Iterator::key(). Make it covariant, or use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.