Skip to content

Commit

Permalink
⬆️ update to rector 2 and phpstan 2 | Matthias Vogel <m.vogel@andersu…
Browse files Browse the repository at this point in the history
…ndsehr.com> | 2025-02-19 12:13:52 +0100 | andersundsehr/grumphp-config@f9c9990
  • Loading branch information
Kanti committed Feb 24, 2025
1 parent 8fa89f5 commit 251839a
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 46 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/tasks.yml

This file was deleted.

44 changes: 40 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,39 @@
"email": "[email protected]"
}
],
"support": {
"source": "https://github.com/andersundsehr/grumphp-config/tree/main/packages/rector-p",
"issues": "https://github.com/andersundsehr/grumphp-config/issues"
},
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"rector/rector": "^1.2.2",
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
"rector/rector": "^2.0.9",
"symfony/console": "^5.4 || ^6.4 || ^7.1"
},
"require-dev": {
"pluswerk/grumphp-config": "^7.0.4",
"roave/security-advisories": "dev-latest"
"andersundsehr/phpstan-git-files": "@dev",
"pluswerk/grumphp-bom-task": "@dev",
"pluswerk/grumphp-config": "@dev",
"pluswerk/grumphp-xliff-task": "@dev"
},
"repositories": [
{
"type": "path",
"url": "../../",
"options": {
"symlink": false,
"reference": "none"
}
},
{
"type": "path",
"url": "../*",
"options": {
"reference": "none",
"relative": false
}
}
],
"autoload": {
"psr-4": {
"Andersundsehr\\RectorP\\": "src/"
Expand All @@ -33,5 +57,17 @@
"phpstan/extension-installer": true,
"pluswerk/grumphp-config": true
}
},
"extra": {
"branch-alias": {
"dev-main": "10.0-dev"
}
},
"scripts": {
"post-update-cmd": [
"composer bump -D",
"composer normalize",
"rm -rf vendor/pluswerk/grumphp-config/vendor vendor/pluswerk/grumphp-config/packages"
]
}
}
6 changes: 3 additions & 3 deletions src/Dto/ChunkConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
use Stringable;
use InvalidArgumentException;

final class ChunkConfig implements Stringable
final readonly class ChunkConfig implements Stringable
{
public function __construct(
public readonly int $chunkNumber = 1,
public readonly int $totalChunks = 1,
public int $chunkNumber = 1,
public int $totalChunks = 1,
) {
if ($this->totalChunks < 1) {
throw new InvalidArgumentException('totalChunks must be greater than 0 give:' . $this);
Expand Down
5 changes: 1 addition & 4 deletions src/PartialCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@
use InvalidArgumentException;
use Rector\Bootstrap\RectorConfigsResolver;
use Rector\Config\RectorConfig;
use Rector\Configuration\ConfigInitializer;
use Rector\Configuration\ConfigurationFactory;
use Rector\Configuration\Option;
use Rector\Configuration\Parameter\SimpleParameterProvider;
use Rector\DependencyInjection\RectorContainerFactory;
use Rector\FileSystem\FilesFinder;
use Rector\StaticReflection\DynamicSourceLocatorDecorator;
use Rector\ValueObject\Configuration;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\QuestionHelper;
Expand Down Expand Up @@ -177,7 +174,7 @@ private function workOnFiles(array $chunkedFiles): void
{
$timeCountMax = count($chunkedFiles);
$timeIndex = 0;
foreach (array_values($chunkedFiles) as $index => $file) {
foreach ($chunkedFiles as $index => $file) {
if ($this->cache->isProcessed($file)) {
$timeCountMax--;
continue;
Expand Down

0 comments on commit 251839a

Please sign in to comment.