bump versions and set php83 as new target

This commit is contained in:
lubiana 2024-02-03 01:07:15 +01:00
parent f30fbd3758
commit 8c90c27762
6 changed files with 34 additions and 29 deletions

View file

@ -8,9 +8,10 @@
} }
}, },
"require": { "require": {
"php": "^8.3",
"slevomat/coding-standard": "^8.14.1", "slevomat/coding-standard": "^8.14.1",
"symplify/easy-coding-standard": "^12.1.8", "symplify/easy-coding-standard": "^12.1.8",
"rector/rector": "^0.19.2" "rector/rector": "^0.19.5"
}, },
"config": { "config": {
"allow-plugins": { "allow-plugins": {

18
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "a2ee536230b7262151afd736f0600119", "content-hash": "da852e748b3a7adc9b558b097386ff95",
"packages": [ "packages": [
{ {
"name": "dealerdirect/phpcodesniffer-composer-installer", "name": "dealerdirect/phpcodesniffer-composer-installer",
@ -195,16 +195,16 @@
}, },
{ {
"name": "rector/rector", "name": "rector/rector",
"version": "0.19.2", "version": "0.19.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/rectorphp/rector.git", "url": "https://github.com/rectorphp/rector.git",
"reference": "bc96a99895bf47c6bfe70ea1b799f0081ed5a903" "reference": "89c895d127b9d248d2af007068a824b5348ef81f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/rectorphp/rector/zipball/bc96a99895bf47c6bfe70ea1b799f0081ed5a903", "url": "https://api.github.com/repos/rectorphp/rector/zipball/89c895d127b9d248d2af007068a824b5348ef81f",
"reference": "bc96a99895bf47c6bfe70ea1b799f0081ed5a903", "reference": "89c895d127b9d248d2af007068a824b5348ef81f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -239,7 +239,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/rectorphp/rector/issues", "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": [ "funding": [
{ {
@ -247,7 +247,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-01-19T10:58:30+00:00" "time": "2024-01-29T23:53:47+00:00"
}, },
{ {
"name": "slevomat/coding-standard", "name": "slevomat/coding-standard",
@ -459,7 +459,9 @@
"stability-flags": [], "stability-flags": [],
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": [], "platform": {
"php": "^8.3"
},
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.6.0" "plugin-api-version": "2.6.0"
} }

View file

@ -2,6 +2,8 @@
use PhpCsFixer\Fixer\Import\OrderedImportsFixer; use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
use PhpCsFixer\Fixer\LanguageConstruct\FunctionToConstantFixer; use PhpCsFixer\Fixer\LanguageConstruct\FunctionToConstantFixer;
use PhpCsFixer\Fixer\Operator\NewWithBracesFixer;
use PhpCsFixer\Fixer\Operator\NewWithParenthesesFixer;
use PhpCsFixer\Fixer\Operator\OperatorLinebreakFixer; use PhpCsFixer\Fixer\Operator\OperatorLinebreakFixer;
use PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer; use PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer;
use PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer; use PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer;
@ -22,21 +24,21 @@ use Symplify\EasyCodingStandard\Config\ECSConfig;
return ECSConfig::configure() return ECSConfig::configure()
->withPreparedSets( ->withPreparedSets(
symplify: true,
arrays: true, arrays: true,
cleanCode: true,
comments: true, comments: true,
controlStructures: true,
docblocks: true, docblocks: true,
namespaces: true,
spaces: true, spaces: true,
namespaces: true,
controlStructures: true,
strict: true, strict: true,
symplify: true cleanCode: true
) )
->withPhpCsFixerSets( ->withPhpCsFixerSets(
perCS: true, perCS: true,
perCSRisky: true, perCSRisky: true,
php83Migration: true,
php80MigrationRisky: true, php80MigrationRisky: true,
php83Migration: true,
) )
->withRules([ ->withRules([
AlphabeticallySortedUsesSniff::class, AlphabeticallySortedUsesSniff::class,
@ -108,4 +110,6 @@ return ECSConfig::configure()
BlankLineAfterOpeningTagFixer::class, BlankLineAfterOpeningTagFixer::class,
OrderedImportsFixer::class, OrderedImportsFixer::class,
FunctionToConstantFixer::class, FunctionToConstantFixer::class,
NewWithParenthesesFixer::class,
NewWithBracesFixer::class,
]); ]);

View file

@ -43,9 +43,9 @@ use Rector\TypeDeclaration\Rector\FunctionLike\AddParamTypeSplFixedArrayRector;
use Rector\TypeDeclaration\Rector\FunctionLike\AddReturnTypeDeclarationFromYieldsRector; use Rector\TypeDeclaration\Rector\FunctionLike\AddReturnTypeDeclarationFromYieldsRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector; use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
return static function (RectorConfig $c): void { return RectorConfig::configure()
$c->sets([LevelSetList::UP_TO_PHP_82]); ->withSets([LevelSetList::UP_TO_PHP_83])
$c->rules([ ->withRules([
AddArrowFunctionReturnTypeRector::class, AddArrowFunctionReturnTypeRector::class,
AddMethodCallBasedStrictParamTypeRector::class, AddMethodCallBasedStrictParamTypeRector::class,
AddParamTypeFromPropertyTypeRector::class, AddParamTypeFromPropertyTypeRector::class,
@ -86,5 +86,5 @@ return static function (RectorConfig $c): void {
ThrowWithPreviousExceptionRector::class, ThrowWithPreviousExceptionRector::class,
TypedPropertyFromStrictConstructorRector::class, TypedPropertyFromStrictConstructorRector::class,
RemoveAlwaysElseRector::class, RemoveAlwaysElseRector::class,
]); ])
}; ;

View file

@ -3,13 +3,11 @@
use Lubiana\CodeQuality\LubiSetList; use Lubiana\CodeQuality\LubiSetList;
use Rector\Config\RectorConfig; use Rector\Config\RectorConfig;
return static function (RectorConfig $c): void { return RectorConfig::configure()
$c->paths([ ->withPaths([
__DIR__ . '/src', __DIR__ . '/src',
__DIR__ . '/config', __DIR__ . '/config',
__DIR__ . '/rector.php', ])
__DIR__ . '/ecs.php', ->withSets([LubiSetList::RECTOR])
]); ->withRootFiles()
;
$c->sets([LubiSetList::RECTOR]);
};

View file

@ -4,7 +4,7 @@ namespace Lubiana\CodeQuality;
final class LubiSetList 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';
} }