phpermutations icon indicating copy to clipboard operation
phpermutations copied to clipboard

Deprecation Notices in PHP 8.3

Open underrobyn opened this issue 1 year ago • 0 comments

Hi,

Running PHP 8.3.0:

PHP 8.3.0 (cli) (built: Nov 21 2023 17:48:31) (ZTS Visual C++ 2019 x64)

I am getting Deprecation notices when trying to fetch combinations using the following code:

$galaxyIDs = array_keys($galaxies);
print_r($galaxyIDs);

$galaxyCombinations = new Combinations($galaxyIDs, 2);
print_r($galaxyCombinations->toArray());

The output of the code is:

Array
(
    [0] => 1
    [1] => 2
    [2] => 3
    [3] => 4
    [4] => 5
    [5] => 6
    [6] => 7
    [7] => 8
    [8] => 9
)

Deprecated: Return type of drupol\phpermutations\Combinatorics::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Development\AdventOfCode2023\vendor\drupol\phpermutations\src\Combinatorics.php on line 53

Deprecated: Return type of drupol\phpermutations\Iterators::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Development\AdventOfCode2023\vendor\drupol\phpermutations\src\Iterators.php on line 26

Deprecated: Return type of drupol\phpermutations\Iterators::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Development\AdventOfCode2023\vendor\drupol\phpermutations\src\Iterators.php on line 34

Deprecated: Return type of drupol\phpermutations\Iterators::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Development\AdventOfCode2023\vendor\drupol\phpermutations\src\Iterators.php on line 44

Deprecated: Return type of drupol\phpermutations\Iterators\Combinations::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Development\AdventOfCode2023\vendor\drupol\phpermutations\src\Iterators\Combinations.php on line 65

Deprecated: Return type of drupol\phpermutations\Iterators\Combinations::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Development\AdventOfCode2023\vendor\drupol\phpermutations\src\Iterators\Combinations.php on line 88

underrobyn avatar Dec 27 '23 14:12 underrobyn