psalm / phar

A place for Psalm's Phar to live in a composer-versioned setting
https://psalm.dev
24 stars 4 forks source link

PHP 8.1 deprecations #12

Open someniatko opened 2 years ago

someniatko commented 2 years ago

I use psalm/phar 4.23.0

When running on PHP 8.1 I get the following output:

PHP Deprecated:  Return type of HumbugBox383\KevinGH\RequirementChecker\RequirementCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///var/app/vendor/psalm/phar/psalm.phar/.box/src/RequirementCollection.php on line 15

Deprecated: Return type of HumbugBox383\KevinGH\RequirementChecker\RequirementCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///var/app/vendor/psalm/phar/psalm.phar/.box/src/RequirementCollection.php on line 15
PHP Deprecated:  Return type of HumbugBox383\KevinGH\RequirementChecker\RequirementCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///var/app/vendor/psalm/phar/psalm.phar/.box/src/RequirementCollection.php on line 19

Deprecated: Return type of HumbugBox383\KevinGH\RequirementChecker\RequirementCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///var/app/vendor/psalm/phar/psalm.phar/.box/src/RequirementCollection.php on line 19
PHP Deprecated:  Return type of HumbugBox383\KevinGH\RequirementChecker\RequirementCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///var/app/vendor/psalm/phar/psalm.phar/.box/src/RequirementCollection.php on line 15
Deprecated: Return type of HumbugBox383\KevinGH\RequirementChecker\RequirementCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///var/app/vendor/psalm/phar/psalm.phar/.box/src/RequirementCollection.php on line 15
PHP Deprecated:  Return type of HumbugBox383\KevinGH\RequirementChecker\RequirementCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///var/app/vendor/psalm/phar/psalm.phar/.box/src/RequirementCollection.php on line 19
Deprecated: Return type of HumbugBox383\KevinGH\RequirementChecker\RequirementCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///var/app/vendor/psalm/phar/psalm.phar/.box/src/RequirementCollection.php on line 19
Target PHP version: 7.4 (inferred from composer.json)
Scanning files...
Analyzing files...

Probably it has something to do with the used Box project version?

BafS commented 1 year ago

Reported here too: https://github.com/vimeo/psalm/issues/7314