Skip to content

Commit 251839a

Browse files
committed
⬆️ update to rector 2 and phpstan 2 | Matthias Vogel <m.vogel@andersundsehr.com> | 2025-02-19 12:13:52 +0100 | andersundsehr/grumphp-config@f9c9990
1 parent 8fa89f5 commit 251839a

File tree

4 files changed

+44
-46
lines changed

4 files changed

+44
-46
lines changed

.github/workflows/tasks.yml

-35
This file was deleted.

composer.json

+40-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,39 @@
99
"email": "m.vogel@andersundsehr.com"
1010
}
1111
],
12+
"support": {
13+
"source": "https://github.com/andersundsehr/grumphp-config/tree/main/packages/rector-p",
14+
"issues": "https://github.com/andersundsehr/grumphp-config/issues"
15+
},
1216
"require": {
13-
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
14-
"rector/rector": "^1.2.2",
17+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
18+
"rector/rector": "^2.0.9",
1519
"symfony/console": "^5.4 || ^6.4 || ^7.1"
1620
},
1721
"require-dev": {
18-
"pluswerk/grumphp-config": "^7.0.4",
19-
"roave/security-advisories": "dev-latest"
22+
"andersundsehr/phpstan-git-files": "@dev",
23+
"pluswerk/grumphp-bom-task": "@dev",
24+
"pluswerk/grumphp-config": "@dev",
25+
"pluswerk/grumphp-xliff-task": "@dev"
2026
},
27+
"repositories": [
28+
{
29+
"type": "path",
30+
"url": "../../",
31+
"options": {
32+
"symlink": false,
33+
"reference": "none"
34+
}
35+
},
36+
{
37+
"type": "path",
38+
"url": "../*",
39+
"options": {
40+
"reference": "none",
41+
"relative": false
42+
}
43+
}
44+
],
2145
"autoload": {
2246
"psr-4": {
2347
"Andersundsehr\\RectorP\\": "src/"
@@ -33,5 +57,17 @@
3357
"phpstan/extension-installer": true,
3458
"pluswerk/grumphp-config": true
3559
}
60+
},
61+
"extra": {
62+
"branch-alias": {
63+
"dev-main": "10.0-dev"
64+
}
65+
},
66+
"scripts": {
67+
"post-update-cmd": [
68+
"composer bump -D",
69+
"composer normalize",
70+
"rm -rf vendor/pluswerk/grumphp-config/vendor vendor/pluswerk/grumphp-config/packages"
71+
]
3672
}
3773
}

src/Dto/ChunkConfig.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
use Stringable;
88
use InvalidArgumentException;
99

10-
final class ChunkConfig implements Stringable
10+
final readonly class ChunkConfig implements Stringable
1111
{
1212
public function __construct(
13-
public readonly int $chunkNumber = 1,
14-
public readonly int $totalChunks = 1,
13+
public int $chunkNumber = 1,
14+
public int $totalChunks = 1,
1515
) {
1616
if ($this->totalChunks < 1) {
1717
throw new InvalidArgumentException('totalChunks must be greater than 0 give:' . $this);

src/PartialCommand.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@
1010
use InvalidArgumentException;
1111
use Rector\Bootstrap\RectorConfigsResolver;
1212
use Rector\Config\RectorConfig;
13-
use Rector\Configuration\ConfigInitializer;
14-
use Rector\Configuration\ConfigurationFactory;
1513
use Rector\Configuration\Option;
1614
use Rector\Configuration\Parameter\SimpleParameterProvider;
1715
use Rector\DependencyInjection\RectorContainerFactory;
1816
use Rector\FileSystem\FilesFinder;
19-
use Rector\StaticReflection\DynamicSourceLocatorDecorator;
2017
use Rector\ValueObject\Configuration;
2118
use Symfony\Component\Console\Command\Command;
2219
use Symfony\Component\Console\Helper\QuestionHelper;
@@ -177,7 +174,7 @@ private function workOnFiles(array $chunkedFiles): void
177174
{
178175
$timeCountMax = count($chunkedFiles);
179176
$timeIndex = 0;
180-
foreach (array_values($chunkedFiles) as $index => $file) {
177+
foreach ($chunkedFiles as $index => $file) {
181178
if ($this->cache->isProcessed($file)) {
182179
$timeCountMax--;
183180
continue;

0 commit comments

Comments
 (0)