Skip to content

Commit 2065fe0

Browse files
authored
infra: bump sigwin/infra (#179)
* infra: bump sigwin/infra * fix: bump Phpspreadsheet
1 parent 82545ec commit 2065fe0

27 files changed

+67
-204
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"nyholm/nsa": "^1.1",
2222
"nyholm/symfony-bundle-test": "dev-master",
2323
"openspout/openspout": "^4.0",
24-
"phpoffice/phpspreadsheet": "^1.18",
24+
"phpoffice/phpspreadsheet": "^1.29",
2525
"phpunit/phpunit": "^9.6",
26-
"sigwin/infra": "~1.5.0",
26+
"sigwin/infra": "~1.6.0",
2727
"symfony/console": "^5.4 || ^6.0",
2828
"symfony/framework-bundle": "^5.4 || ^6.0",
2929
"symfony/phpunit-bridge": "^5.4 || ^6.0",

infection.json.dist

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@
1414
"@default": true,
1515
"IdenticalEqual": false,
1616
"NotIdenticalNotEqual": false,
17+
"IfNegation": {
18+
"ignore": [
19+
"Xezilaires\\Bridge\\Symfony\\DependencyInjection\\XezilairesExtension::load::36",
20+
"Xezilaires\\Bridge\\Symfony\\DependencyInjection\\XezilairesExtension::load::39"
21+
]
22+
},
1723
"MethodCallRemoval": {
1824
"ignore": [
19-
"Xezilaires\\Bridge\\Symfony\\DependencyInjection\\XezilairesExtension::load::45"
25+
"Xezilaires\\Bridge\\Symfony\\DependencyInjection\\XezilairesExtension::load::43"
2026
]
2127
}
2228
}

src/Bridge/PhpSpreadsheet/RowIterator.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,49 +30,31 @@ public function __construct(PhpSpreadsheetRowIterator $iterator)
3030
$this->iterator = $iterator;
3131
}
3232

33-
/**
34-
* {@inheritdoc}
35-
*/
3633
public function current(): object
3734
{
3835
return $this->iterator->current();
3936
}
4037

41-
/**
42-
* {@inheritdoc}
43-
*/
4438
public function next(): void
4539
{
4640
$this->iterator->next();
4741
}
4842

49-
/**
50-
* {@inheritdoc}
51-
*/
5243
public function key(): int
5344
{
5445
return $this->iterator->key();
5546
}
5647

57-
/**
58-
* {@inheritdoc}
59-
*/
6048
public function valid(): bool
6149
{
6250
return $this->iterator->valid();
6351
}
6452

65-
/**
66-
* {@inheritdoc}
67-
*/
6853
public function rewind(): void
6954
{
7055
$this->iterator->rewind();
7156
}
7257

73-
/**
74-
* {@inheritdoc}
75-
*/
7658
public function seek(int $rowIndex): void
7759
{
7860
try {
@@ -82,9 +64,6 @@ public function seek(int $rowIndex): void
8264
}
8365
}
8466

85-
/**
86-
* {@inheritdoc}
87-
*/
8867
public function prev(): void
8968
{
9069
$this->iterator->prev();

src/Bridge/PhpSpreadsheet/Spreadsheet.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ public static function fromFile(\SplFileObject $file): SpreadsheetInterface
4747
return new self($file);
4848
}
4949

50-
/**
51-
* {@inheritdoc}
52-
*/
5350
public function createIterator(int $startRowIndex): void
5451
{
5552
/** @psalm-suppress RedundantPropertyInitializationCheck */
@@ -62,9 +59,6 @@ public function createIterator(int $startRowIndex): void
6259
$this->iterator = new RowIterator($sheet->getRowIterator($startRowIndex));
6360
}
6461

65-
/**
66-
* {@inheritdoc}
67-
*/
6862
public function getIterator(): Iterator
6963
{
7064
/** @psalm-suppress RedundantPropertyInitializationCheck */
@@ -75,9 +69,6 @@ public function getIterator(): Iterator
7569
return $this->iterator;
7670
}
7771

78-
/**
79-
* {@inheritdoc}
80-
*/
8172
public function getCurrentRow(): array
8273
{
8374
/** @var Row $row */
@@ -86,9 +77,6 @@ public function getCurrentRow(): array
8677
return $this->getRow($row->getRowIndex());
8778
}
8879

89-
/**
90-
* {@inheritdoc}
91-
*/
9280
public function getRow(int $rowIndex): array
9381
{
9482
$data = [];
@@ -103,9 +91,6 @@ public function getRow(int $rowIndex): array
10391
return $data;
10492
}
10593

106-
/**
107-
* {@inheritdoc}
108-
*/
10994
public function getHighestRow(): int
11095
{
11196
return $this->getActiveWorksheet()->getHighestRow();

src/Bridge/PhpSpreadsheet/Test/RowIteratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private function mockIterator(?array $counts = null): PhpspreadsheetRowIterator
8989
$count = $spec['count'];
9090

9191
$mocker = $iterator
92-
->expects(static::exactly($count))
92+
->expects(self::exactly($count))
9393
->method($method)
9494
->with(...(array) $spec['params'])
9595
;

src/Bridge/PhpSpreadsheet/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": "^8.1",
14-
"phpoffice/phpspreadsheet": "^1.18",
14+
"phpoffice/phpspreadsheet": "^1.29",
1515
"sigwin/xezilaires": "^0.6"
1616
},
1717
"require-dev": {

src/Bridge/Spout/RowIterator.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ public function __construct(RowIteratorInterface $iterator, int $firstRow)
3939
$this->firstRow = $firstRow;
4040
}
4141

42-
/**
43-
* {@inheritdoc}
44-
*/
4542
public function current(): object
4643
{
4744
/**
@@ -57,17 +54,11 @@ public function current(): object
5754
return new \ArrayObject($current);
5855
}
5956

60-
/**
61-
* {@inheritdoc}
62-
*/
6357
public function next(): void
6458
{
6559
$this->iterator->next();
6660
}
6761

68-
/**
69-
* {@inheritdoc}
70-
*/
7162
public function key(): int
7263
{
7364
/** @var int $key */
@@ -76,25 +67,16 @@ public function key(): int
7667
return $key;
7768
}
7869

79-
/**
80-
* {@inheritdoc}
81-
*/
8270
public function valid(): bool
8371
{
8472
return $this->iterator->valid();
8573
}
8674

87-
/**
88-
* {@inheritdoc}
89-
*/
9075
public function rewind(): void
9176
{
9277
$this->seek($this->firstRow);
9378
}
9479

95-
/**
96-
* {@inheritdoc}
97-
*/
9880
public function seek(int $rowIndex): void
9981
{
10082
$currentIndex = $this->key();
@@ -111,9 +93,6 @@ public function seek(int $rowIndex): void
11193
}
11294
}
11395

114-
/**
115-
* {@inheritdoc}
116-
*/
11796
public function prev(): void
11897
{
11998
$this->seek($this->key() - 1);

src/Bridge/Spout/Spreadsheet.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ public static function fromFile(\SplFileObject $file): SpreadsheetInterface
5454
return new self($file);
5555
}
5656

57-
/**
58-
* {@inheritdoc}
59-
*/
6057
public function createIterator(int $startRowIndex): void
6158
{
6259
/** @psalm-suppress RedundantPropertyInitializationCheck */
@@ -80,9 +77,6 @@ public function getIterator(): Iterator
8077
return $this->iterator;
8178
}
8279

83-
/**
84-
* {@inheritdoc}
85-
*/
8680
public function getRow(int $rowIndex): array
8781
{
8882
$iterator = $this->getIterator();
@@ -94,9 +88,6 @@ public function getRow(int $rowIndex): array
9488
return $row;
9589
}
9690

97-
/**
98-
* {@inheritdoc}
99-
*/
10091
public function getCurrentRow(): array
10192
{
10293
/** @var \ArrayObject $rowArrayObject */
@@ -117,9 +108,6 @@ public function getCurrentRow(): array
117108
return $row;
118109
}
119110

120-
/**
121-
* {@inheritdoc}
122-
*/
123111
public function getHighestRow(): int
124112
{
125113
/** @psalm-suppress RedundantPropertyInitializationCheck */

src/Bridge/Spout/Test/RowIteratorTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class RowIteratorTest extends TestCase
2929
/**
3030
* @return list<array{0: int, 1: int, 2: int, 3: array{rewind: int, next: int, valid: int}}>
3131
*/
32-
public function seekProvider(): array
32+
public function provideCanSeekProperlyCases(): iterable
3333
{
3434
return [
3535
[2, 2, 2, ['rewind' => 1, 'next' => 0, 'valid' => 0]],
@@ -41,15 +41,15 @@ public function seekProvider(): array
4141
/**
4242
* @return list<array{0: int, 1: int, 2: int, 3: array{rewind: int, next: int}, 4: array{valid: list<bool>}}>
4343
*/
44-
public function getHighestRowProvider(): array
44+
public function provideCanDetermineHighestRowProperlyCases(): iterable
4545
{
4646
return [
4747
[1, 1, 2, ['rewind' => 2, 'next' => 2], ['valid' => [true, true, false]]],
4848
];
4949
}
5050

5151
/**
52-
* @dataProvider seekProvider
52+
* @dataProvider provideCanSeekProperlyCases
5353
*
5454
* @param array<string, int> $counts
5555
*/
@@ -60,7 +60,7 @@ public function testCanSeekProperly(int $startRow, int $currentRow, int $seekToR
6060
}
6161

6262
/**
63-
* @dataProvider getHighestRowProvider
63+
* @dataProvider provideCanDetermineHighestRowProperlyCases
6464
*
6565
* @param array<string, int> $counts
6666
* @param array<string, array> $calls
@@ -71,7 +71,7 @@ public function testCanDetermineHighestRowProperly(int $startRow, int $currentRo
7171
++$counts['rewind'];
7272

7373
$iterator = new RowIterator($this->mockIterator($currentRow, $counts, $calls), $startRow);
74-
static::assertSame($highestRow, $iterator->getHighestRow());
74+
self::assertSame($highestRow, $iterator->getHighestRow());
7575
}
7676

7777
/**
@@ -93,7 +93,7 @@ private function mockIterator(int $currentRow, ?array $counts = null, ?array $ca
9393
if ($counts !== null) {
9494
foreach ($counts as $method => $count) {
9595
$iterator
96-
->expects(static::exactly($count))
96+
->expects(self::exactly($count))
9797
->method($method)
9898
;
9999
}
@@ -102,7 +102,7 @@ private function mockIterator(int $currentRow, ?array $counts = null, ?array $ca
102102
if ($calls !== null) {
103103
foreach ($calls as $method => $return) {
104104
$iterator
105-
->expects(static::exactly(\count($return)))
105+
->expects(self::exactly(\count($return)))
106106
->method($method)
107107
->willReturnOnConsecutiveCalls(...$return)
108108
;

src/Bridge/Spout/Test/SpreadsheetTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ public function testCanCorrectlyCalculateColumns(): void
4343
$object = new Spreadsheet($this->invalidFixture('products.xlsx'));
4444
NSA::setProperty($object, 'iterator', new FakeIterator([(object) $row]));
4545

46-
static::assertSame(array_combine($values, $values), $object->getCurrentRow());
46+
self::assertSame(array_combine($values, $values), $object->getCurrentRow());
4747
}
4848
}

0 commit comments

Comments
 (0)