Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #95

Merged
merged 2 commits into from Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -42,7 +42,7 @@
"friendsofphp/php-cs-fixer": "^3",
"phpstan/phpstan": "^1.3",
"phpunit/phpunit": "^9.5",
"rector/rector": "^0.14"
"rector/rector": "^0.15"
},
"autoload": {
"classmap": [
Expand Down
54 changes: 29 additions & 25 deletions rector.php
Expand Up @@ -8,35 +8,39 @@
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector;
use Rector\Php74\Rector\Property\TypedPropertyRector;
use Rector\Php80\Rector\FunctionLike\UnionTypesRector;
use Rector\PostRector\Rector\NameImportingPostRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;

return static function (RectorConfig $rector_config): void {
// Path to phpstan with extensions, that PHPSTan in Rector uses to determine types
$rector_config->phpstanConfig(__DIR__ . '/phpstan.neon');

// Define what rule sets will be applied
$rector_config->import(SetList::DEAD_CODE);
$rector_config->skip([
StringClassNameToClassConstantRector::class,
UnionTypesRector::class,
JsonThrowOnErrorRector::class,

]);

// define sets of rules
$rector_config->sets([
LevelSetList::UP_TO_PHP_81,
]);

$services = $rector_config->services();

$services->set(TypedPropertyRector::class);
$services->set(IntvalToTypeCastRector::class);
$services->set(AddLiteralSeparatorToNumberRector::class);
$services->set(ClosureToArrowFunctionRector::class);
$services->set(NameImportingPostRector::class);
// Path to phpstan with extensions, that PHPSTan in Rector uses to determine types
$rector_config->phpstanConfig(__DIR__ . '/phpstan.neon');

// Define paths to process
$rector_config->paths([
'src/',
'tests/'
]);

// Define what rule sets will be applied
$rector_config->import(SetList::DEAD_CODE);
$rector_config->skip([
StringClassNameToClassConstantRector::class,
UnionTypesRector::class,
JsonThrowOnErrorRector::class,

]);

// define sets of rules
$rector_config->sets([
LevelSetList::UP_TO_PHP_81,
]);

$services = $rector_config->services();

$services->set(IntvalToTypeCastRector::class);
$services->set(AddLiteralSeparatorToNumberRector::class);
$services->set(ClosureToArrowFunctionRector::class);
$services->set(NameImportingPostRector::class);
};