Skip to content

Commit

Permalink
Merge pull request #8 from symplify/tv-update-core
Browse files Browse the repository at this point in the history
Bump to next Rector version without Core prefix
  • Loading branch information
TomasVotruba authored Jan 2, 2024
2 parents 0326bb6 + 5102daf commit 4fc2e98
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 31 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/code_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ jobs:
name: 'Tests'
run: vendor/bin/phpunit

-
name: 'PHP Linter'
run: vendor/bin/parallel-lint src tests

-
name: 'Check Commented Code'
run: vendor/bin/easy-ci check-commented-code src tests --ansi

-
name: 'Check Active Classes'
run: vendor/bin/class-leak check src --ansi
Expand Down
20 changes: 8 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,23 @@
],
"require": {
"php": ">=8.1",
"symfony/console": "^6.2",
"symfony/console": "^6.4",
"nette/robot-loader": "^3.4|^4.0",
"symplify/rule-doc-generator-contracts": "^11.1",
"nette/utils": "^3.2|^4.0",
"sebastian/diff": "^5.0",
"illuminate/container": "^10.18",
"sebastian/diff": "^5.1",
"illuminate/container": "^10.39",
"webmozart/assert": "^1.11",
"symfony/yaml": "^6.3",
"symfony/filesystem": "^6.3"
"symfony/yaml": "^6.4",
"symfony/filesystem": "^6.4"
},
"require-dev": {
"phpunit/phpunit": "^10.3",
"phpunit/phpunit": "^10.5",
"phpstan/phpstan": "^1.10",
"symplify/easy-coding-standard": "^12.0",
"rector/rector": "^0.17",
"symplify/easy-ci": "^11.2",
"php-parallel-lint/php-parallel-lint": "^1.3",
"rector/rector": "dev-main",
"tracy/tracy": "^2.10",
"tomasvotruba/class-leak": "^0.1",
"tomasvotruba/unused-public": "^0.3",
"tomasvotruba/cognitive-complexity": "^0.1.1"
"tomasvotruba/class-leak": "^0.2"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion rector.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\PHPUnit\Set\PHPUnitSetList;

use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;

Expand Down
2 changes: 1 addition & 1 deletion src/Printer/RuleDefinitionsPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function print(array $ruleDefinitions, ?int $categorizeLevel): array
$ruleDefinitionsByCategory = $this->groupDefinitionsByCategory($ruleDefinitions, $categorizeLevel);

$categoryMenuLines = $this->createCategoryMenu($ruleDefinitionsByCategory);
$lines = array_merge($lines, $categoryMenuLines);
$lines = [...$lines, ...$categoryMenuLines];

foreach ($ruleDefinitionsByCategory as $category => $ruleDefinitions) {
$lines[] = '## ' . $category;
Expand Down
2 changes: 1 addition & 1 deletion src/RuleCodeSamplePrinter/PHPStanRuleCodeSamplePrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ private function printConfigurableCodeSample(
$lines[] = '';

$newLines = $this->badGoodCodeSamplePrinter->print($configuredCodeSample);
return array_merge($lines, $newLines);
return [...$lines, ...$newLines];
}
}
2 changes: 1 addition & 1 deletion src/RuleCodeSamplePrinter/RectorRuleCodeSamplePrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Symplify\RuleDocGenerator\RuleCodeSamplePrinter;

use Rector\Core\Contract\Rector\RectorInterface;
use Rector\Contract\Rector\RectorInterface;
use Symplify\RuleDocGenerator\Contract\CodeSampleInterface;
use Symplify\RuleDocGenerator\Contract\RuleCodeSamplePrinterInterface;
use Symplify\RuleDocGenerator\Printer\CodeSamplePrinter\DiffCodeSamplePrinter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Symplify\RuleDocGenerator\Tests\DirectoryToMarkdownPrinter\Fixture\Rector\Configurable;

use Rector\Core\Contract\Rector\RectorInterface;
use Rector\Contract\Rector\RectorInterface;
use Symplify\RuleDocGenerator\Contract\ConfigurableRuleInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Symplify\RuleDocGenerator\Tests\DirectoryToMarkdownPrinter\Fixture\Rector\Configurable;

use Rector\Core\Contract\Rector\RectorInterface;
use Rector\Contract\Rector\RectorInterface;
use Symplify\RuleDocGenerator\Contract\ConfigurableRuleInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Symplify\RuleDocGenerator\Tests\DirectoryToMarkdownPrinter\Fixture\Rector\Configurable;

use PHPStan\Type\ObjectType;
use Rector\Core\Contract\Rector\RectorInterface;
use Rector\Contract\Rector\RectorInterface;
use Symplify\RuleDocGenerator\Contract\ConfigurableRuleInterface;
use Symplify\RuleDocGenerator\Tests\DirectoryToMarkdownPrinter\Source\SomeValueObjectWrapper;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

namespace Symplify\RuleDocGenerator\Tests\DirectoryToMarkdownPrinter\Fixture\Rector\Standard;

use Rector\Core\Contract\Rector\RectorInterface;
use PhpParser\Node;
use Rector\Contract\Rector\RectorInterface;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;

final class SomeRector implements RectorInterface
final class SomeRector extends AbstractRector implements RectorInterface
{
public function getRuleDefinition(): RuleDefinition
{
Expand All @@ -24,4 +26,12 @@ public function getRuleDefinition(): RuleDefinition
),
]);
}

public function getNodeTypes(): array
{
}

public function refactor(Node $node)
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

namespace Symplify\RuleDocGenerator\Tests\DirectoryToMarkdownPrinter\Fixture\Rector\Standard;

use Rector\Core\Contract\Rector\RectorInterface;
use PhpParser\Node;
use Rector\Contract\Rector\RectorInterface;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;

final class SomeWhiteSpaceCodeSampleRector implements RectorInterface
final class SomeWhiteSpaceCodeSampleRector extends AbstractRector implements RectorInterface
{
public function getRuleDefinition(): RuleDefinition
{
Expand All @@ -26,4 +28,12 @@ public function getRuleDefinition(): RuleDefinition
),
]);
}

public function getNodeTypes(): array
{
}

public function refactor(Node $node)
{
}
}

0 comments on commit 4fc2e98

Please sign in to comment.