rector
rector copied to clipboard
Multiple depreciations under php 8.18
When I use the latest version of Rector 0.13.8 under php 8.18 I get these depreciation errors:
PHP Deprecated: Return type of PHPUnit\Framework\TestCase::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /application/vendor/phpunit/phpunit/src/Framework/TestCase.php on line 374
Deprecated: Return type of PHPUnit\Framework\TestCase::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /application/vendor/phpunit/phpunit/src/Framework/TestCase.php on line 374
That's seems not rector issue, but your vendor/phpunit
. Looking at latest phpunit, it seems already return int
:
https://github.com/sebastianbergmann/phpunit/blob/0cab10bdc4e44dbc65b0061230519f7255a61454/src/Framework/TestCase.php#L375
You may need to use latest phpunit. If the issue persist, please provide the reproducible repository for it, which showing that the issue only exists when it install along with rector, better with github action running.
What phpunit version do you use?
This has to be solved in PHPUnit itself :+1: Please report issue there.