php-composer-reader icon indicating copy to clipboard operation
php-composer-reader copied to clipboard

Deprecation warning on mixed lines on DataIterator.php (php 8.2)

Open dustin-brisebois opened this issue 1 year ago • 3 comments

Greetings

We are seeing a number of deprecation warnings on lines #66, #74, #82, #90, #98 and #106 for DataIterator.php

Deprecation Notice: Return type of Nadar\PhpComposerReader\DataIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/nadar/php-composer-reader/src/DataIterator.php:66 Deprecation Notice: Return type of Nadar\PhpComposerReader\DataIterator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/nadar/php-composer-reader/src/DataIterator.php:90 Deprecation Notice: Return type of Nadar\PhpComposerReader\DataIterator::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/nadar/php-composer-reader/src/DataIterator.php:82 Deprecation Notice: Return type of Nadar\PhpComposerReader\DataIterator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/nadar/php-composer-reader/src/DataIterator.php:98 Deprecation Notice: Return type of Nadar\PhpComposerReader\DataIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/nadar/php-composer-reader/src/DataIterator.php:74 Deprecation Notice: Return type of Nadar\PhpComposerReader\DataIterator::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/nadar/php-composer-reader/src/DataIterator.php:106

dustin-brisebois avatar Aug 15 '24 16:08 dustin-brisebois

i see 👍 let me fix that quickly

nadar avatar Aug 15 '24 18:08 nadar

@dustin-brisebois what php version are you using?

nadar avatar Aug 15 '24 18:08 nadar

you can test with latest dev master in your composer json "nadar/php-composer-reader" : "dev-master as 2.0.0" and run composer update. what confuses me, is that the phpunit does not trigger that deprecation warning.

nadar avatar Aug 15 '24 18:08 nadar

I am going to close this issue to maintain a clean issue tracker for the following reasons:

  1. Incomplete information (Are there any unanswered questions? Please provide as much information as possible).
  2. Lack of recent activity (No further replies).
  3. No one has taken up the task (no Pull Request has been received).

If you believe that this issue remains important or if you have additional or updated information, please consider reopening the issue and informing us.

nadar avatar Nov 23 '24 19:11 nadar