Skip to content

Commit fabaf07

Browse files
Add php8.4
1 parent ff4d0d9 commit fabaf07

5 files changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
php: ['7.4', '8.0', '8.1', '8.2']
15+
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
1616
composer_update:
1717
- 'composer update --prefer-stable --prefer-lowest'
1818
- 'composer update --prefer-stable'

src/Iterator/BatchIterator.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use InvalidArgumentException;
88
use Iterator;
9+
use ReturnTypeWillChange;
910

1011
use function count;
1112

@@ -40,27 +41,32 @@ public function __construct(Iterator $original, int $batchSize)
4041
$this->batch = [];
4142
}
4243

44+
#[ReturnTypeWillChange]
4345
public function next(): void
4446
{
4547
$this->loadBatch();
4648
$this->batchIndex += 1;
4749
}
4850

51+
#[ReturnTypeWillChange]
4952
public function valid(): bool
5053
{
5154
return !empty($this->batch);
5255
}
5356

57+
#[ReturnTypeWillChange]
5458
public function key()
5559
{
5660
return $this->batchIndex;
5761
}
5862

63+
#[ReturnTypeWillChange]
5964
public function current()
6065
{
6166
return $this->batch;
6267
}
6368

69+
#[ReturnTypeWillChange]
6470
public function rewind(): void
6571
{
6672
$this->original->rewind();

src/Iterator/MapIterator.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace IteratorTools\Iterator;
66

77
use Iterator;
8+
use ReturnTypeWillChange;
89

910
/**
1011
* @psalm-template K
@@ -28,11 +29,13 @@ public function __construct(Iterator $innerIterator)
2829
$this->innerIterator = $innerIterator;
2930
}
3031

32+
#[ReturnTypeWillChange]
3133
public function next(): void
3234
{
3335
$this->innerIterator->next();
3436
}
3537

38+
#[ReturnTypeWillChange]
3639
public function valid(): bool
3740
{
3841
return $this->innerIterator->valid();
@@ -41,11 +44,13 @@ public function valid(): bool
4144
/**
4245
* @psalm-return K
4346
*/
47+
#[ReturnTypeWillChange]
4448
public function key()
4549
{
4650
return $this->innerIterator->key();
4751
}
4852

53+
#[ReturnTypeWillChange]
4954
public function rewind(): void
5055
{
5156
$this->innerIterator->rewind();
@@ -54,6 +59,7 @@ public function rewind(): void
5459
/**
5560
* @psalm-return R
5661
*/
62+
#[ReturnTypeWillChange]
5763
public function current()
5864
{
5965
return $this->mapValue(

src/Iterator/ReverseIterator.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use EmptyIterator;
88
use Iterator;
99
use IteratorTools\Pair;
10+
use ReturnTypeWillChange;
1011

1112
use function array_reverse;
1213

@@ -35,26 +36,31 @@ public function __construct(Iterator $original)
3536
$this->reverted = new EmptyIterator();
3637
}
3738

39+
#[ReturnTypeWillChange]
3840
public function next(): void
3941
{
4042
$this->reverted->next();
4143
}
4244

45+
#[ReturnTypeWillChange]
4346
public function valid(): bool
4447
{
4548
return $this->reverted->valid();
4649
}
4750

51+
#[ReturnTypeWillChange]
4852
public function key()
4953
{
5054
return $this->reverted->current()->key();
5155
}
5256

57+
#[ReturnTypeWillChange]
5358
public function current()
5459
{
5560
return $this->reverted->current()->value();
5661
}
5762

63+
#[ReturnTypeWillChange]
5864
public function rewind(): void
5965
{
6066
if (false === $this->initialized) {

src/Iterator/functions.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use IteratorAggregate;
1010
use IteratorIterator;
1111
use IteratorTools\IteratorPipeline;
12-
1312
use IteratorTools\Pipeline;
1413

1514
use function is_array;

0 commit comments

Comments
 (0)