php-collection icon indicating copy to clipboard operation
php-collection copied to clipboard

Remove deprecation and add PHP 8.x features

Open mattiabasone opened this issue 3 years ago • 6 comments

Hi! Any chances to merge PR #30? I'm updating my application and using PHP 8.1 I'm getting some deprecation warning like the following one:

Deprecated: Return type of PhpCollection\AbstractMap::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /src/vendor/phpcollection/phpcollection/src/PhpCollection/AbstractMap.php on line 290

mattiabasone avatar May 11 '22 15:05 mattiabasone

I'm seeing two more like these:

Deprecation Notice: Return type of PhpCollection\AbstractSequence::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /drupal/vendor/phpcollection/phpcollection/src/PhpCollection/AbstractSequence.php:356
Deprecation Notice: Return type of PhpCollection\AbstractSequence::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /drupal/vendor/phpcollection/phpcollection/src/PhpCollection/AbstractSequence.php:351

jurgenhaas avatar Aug 25 '22 12:08 jurgenhaas

@schmittjoh is this project dead? Or is there any chance of getting the PR merged?

jurgenhaas avatar Nov 16 '22 08:11 jurgenhaas

@schmittjoh is this project dead? Or is there any chance of getting the PR merged?

@jurgenhaas if you need a package, I forked the project and released a new version with these fixes here

mattiabasone avatar Nov 16 '22 08:11 mattiabasone

Thanks @mattiabasone but it doesn't help because we're not using this package directly. It's cypresslab/gitelephant which brings it as a dependency and hence, this package should be fixed directly.

jurgenhaas avatar Nov 16 '22 09:11 jurgenhaas

Looks like the other package is removing the dependency entirely, so I will just close my PR because I'm tired of getting reminded about it every morning.

jurgenhaas avatar Nov 17 '22 07:11 jurgenhaas

Hey there, here is yet another fork :1234:

imunhatep avatar Nov 21 '22 17:11 imunhatep