bump versions and set php83 as new target
This commit is contained in:
parent
f30fbd3758
commit
8c90c27762
6 changed files with 34 additions and 29 deletions
|
@ -8,9 +8,10 @@
|
|||
}
|
||||
},
|
||||
"require": {
|
||||
"php": "^8.3",
|
||||
"slevomat/coding-standard": "^8.14.1",
|
||||
"symplify/easy-coding-standard": "^12.1.8",
|
||||
"rector/rector": "^0.19.2"
|
||||
"rector/rector": "^0.19.5"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
|
|
18
composer.lock
generated
18
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "a2ee536230b7262151afd736f0600119",
|
||||
"content-hash": "da852e748b3a7adc9b558b097386ff95",
|
||||
"packages": [
|
||||
{
|
||||
"name": "dealerdirect/phpcodesniffer-composer-installer",
|
||||
|
@ -195,16 +195,16 @@
|
|||
},
|
||||
{
|
||||
"name": "rector/rector",
|
||||
"version": "0.19.2",
|
||||
"version": "0.19.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rectorphp/rector.git",
|
||||
"reference": "bc96a99895bf47c6bfe70ea1b799f0081ed5a903"
|
||||
"reference": "89c895d127b9d248d2af007068a824b5348ef81f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/rectorphp/rector/zipball/bc96a99895bf47c6bfe70ea1b799f0081ed5a903",
|
||||
"reference": "bc96a99895bf47c6bfe70ea1b799f0081ed5a903",
|
||||
"url": "https://api.github.com/repos/rectorphp/rector/zipball/89c895d127b9d248d2af007068a824b5348ef81f",
|
||||
"reference": "89c895d127b9d248d2af007068a824b5348ef81f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -239,7 +239,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/rectorphp/rector/issues",
|
||||
"source": "https://github.com/rectorphp/rector/tree/0.19.2"
|
||||
"source": "https://github.com/rectorphp/rector/tree/0.19.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -247,7 +247,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-01-19T10:58:30+00:00"
|
||||
"time": "2024-01-29T23:53:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "slevomat/coding-standard",
|
||||
|
@ -459,7 +459,9 @@
|
|||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform": {
|
||||
"php": "^8.3"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
|
||||
use PhpCsFixer\Fixer\LanguageConstruct\FunctionToConstantFixer;
|
||||
use PhpCsFixer\Fixer\Operator\NewWithBracesFixer;
|
||||
use PhpCsFixer\Fixer\Operator\NewWithParenthesesFixer;
|
||||
use PhpCsFixer\Fixer\Operator\OperatorLinebreakFixer;
|
||||
use PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer;
|
||||
use PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer;
|
||||
|
@ -22,21 +24,21 @@ use Symplify\EasyCodingStandard\Config\ECSConfig;
|
|||
|
||||
return ECSConfig::configure()
|
||||
->withPreparedSets(
|
||||
symplify: true,
|
||||
arrays: true,
|
||||
cleanCode: true,
|
||||
comments: true,
|
||||
controlStructures: true,
|
||||
docblocks: true,
|
||||
namespaces: true,
|
||||
spaces: true,
|
||||
namespaces: true,
|
||||
controlStructures: true,
|
||||
strict: true,
|
||||
symplify: true
|
||||
cleanCode: true
|
||||
)
|
||||
->withPhpCsFixerSets(
|
||||
perCS: true,
|
||||
perCSRisky: true,
|
||||
php83Migration: true,
|
||||
php80MigrationRisky: true,
|
||||
php83Migration: true,
|
||||
)
|
||||
->withRules([
|
||||
AlphabeticallySortedUsesSniff::class,
|
||||
|
@ -108,4 +110,6 @@ return ECSConfig::configure()
|
|||
BlankLineAfterOpeningTagFixer::class,
|
||||
OrderedImportsFixer::class,
|
||||
FunctionToConstantFixer::class,
|
||||
NewWithParenthesesFixer::class,
|
||||
NewWithBracesFixer::class,
|
||||
]);
|
||||
|
|
|
@ -43,9 +43,9 @@ use Rector\TypeDeclaration\Rector\FunctionLike\AddParamTypeSplFixedArrayRector;
|
|||
use Rector\TypeDeclaration\Rector\FunctionLike\AddReturnTypeDeclarationFromYieldsRector;
|
||||
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
|
||||
|
||||
return static function (RectorConfig $c): void {
|
||||
$c->sets([LevelSetList::UP_TO_PHP_82]);
|
||||
$c->rules([
|
||||
return RectorConfig::configure()
|
||||
->withSets([LevelSetList::UP_TO_PHP_83])
|
||||
->withRules([
|
||||
AddArrowFunctionReturnTypeRector::class,
|
||||
AddMethodCallBasedStrictParamTypeRector::class,
|
||||
AddParamTypeFromPropertyTypeRector::class,
|
||||
|
@ -86,5 +86,5 @@ return static function (RectorConfig $c): void {
|
|||
ThrowWithPreviousExceptionRector::class,
|
||||
TypedPropertyFromStrictConstructorRector::class,
|
||||
RemoveAlwaysElseRector::class,
|
||||
]);
|
||||
};
|
||||
])
|
||||
;
|
||||
|
|
14
rector.php
14
rector.php
|
@ -3,13 +3,11 @@
|
|||
use Lubiana\CodeQuality\LubiSetList;
|
||||
use Rector\Config\RectorConfig;
|
||||
|
||||
return static function (RectorConfig $c): void {
|
||||
$c->paths([
|
||||
return RectorConfig::configure()
|
||||
->withPaths([
|
||||
__DIR__ . '/src',
|
||||
__DIR__ . '/config',
|
||||
__DIR__ . '/rector.php',
|
||||
__DIR__ . '/ecs.php',
|
||||
]);
|
||||
|
||||
$c->sets([LubiSetList::RECTOR]);
|
||||
};
|
||||
])
|
||||
->withSets([LubiSetList::RECTOR])
|
||||
->withRootFiles()
|
||||
;
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Lubiana\CodeQuality;
|
|||
|
||||
final class LubiSetList
|
||||
{
|
||||
public const RECTOR = __DIR__ . '/../config/rector.php';
|
||||
public const string RECTOR = __DIR__ . '/../config/rector.php';
|
||||
|
||||
public const ECS = __DIR__ . '/../config/ecs.php';
|
||||
public const string ECS = __DIR__ . '/../config/ecs.php';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue