From ac4d030a8e999b0a30bc1e98a5fffaecd0ea79fb Mon Sep 17 00:00:00 2001 From: Rajesh Kumar Date: Wed, 28 Feb 2024 14:51:24 +0530 Subject: [PATCH 1/5] AC-11385::Investigate phpstan/phpstan latest versions --- composer.json | 2 +- composer.lock | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 36eabf64..39afe8ee 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "ext-simplexml": "*", "ext-dom": "*", "squizlabs/php_codesniffer": "^3.6.1", - "rector/rector": "^0.17.12", + "rector/rector": "^0.19.0", "phpcsstandards/phpcsutils": "^1.0.5", "magento/php-compatibility-fork": "^0.1" }, diff --git a/composer.lock b/composer.lock index bac99425..161bea71 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "2538347534e520207948a130ccd78862", + "content-hash": "4dcee8d6315463cd4dbfdfdb9eb65cd2", "packages": [ { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -243,16 +243,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.50", + "version": "1.10.59", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "06a98513ac72c03e8366b5a0cb00750b487032e4" + "reference": "e607609388d3a6d418a50a49f7940e8086798281" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/06a98513ac72c03e8366b5a0cb00750b487032e4", - "reference": "06a98513ac72c03e8366b5a0cb00750b487032e4", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e607609388d3a6d418a50a49f7940e8086798281", + "reference": "e607609388d3a6d418a50a49f7940e8086798281", "shasum": "" }, "require": { @@ -301,25 +301,25 @@ "type": "tidelift" } ], - "time": "2023-12-13T10:59:42+00:00" + "time": "2024-02-20T13:59:13+00:00" }, { "name": "rector/rector", - "version": "0.17.13", + "version": "0.19.8", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "e2003ba7c5bda06d7bb419cf4be8dae5f8672132" + "reference": "de3b3bb159abd704b144aa86fb244f7f1f4ac947" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/e2003ba7c5bda06d7bb419cf4be8dae5f8672132", - "reference": "e2003ba7c5bda06d7bb419cf4be8dae5f8672132", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/de3b3bb159abd704b144aa86fb244f7f1f4ac947", + "reference": "de3b3bb159abd704b144aa86fb244f7f1f4ac947", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.10.26" + "phpstan/phpstan": "^1.10.56" }, "conflict": { "rector/rector-doctrine": "*", @@ -349,7 +349,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/0.17.13" + "source": "https://github.com/rectorphp/rector/tree/0.19.8" }, "funding": [ { @@ -357,7 +357,7 @@ "type": "github" } ], - "time": "2023-08-14T16:33:29+00:00" + "time": "2024-02-05T10:59:13+00:00" }, { "name": "squizlabs/php_codesniffer", From ae93ecf24574b84ee0f867909bebb45283936ddb Mon Sep 17 00:00:00 2001 From: Rajesh Kumar Date: Mon, 18 Mar 2024 18:18:10 +0530 Subject: [PATCH 2/5] Fixed tests after update the latest versions --- Magento2/Rector/Src/AddArrayAccessInterfaceReturnTypes.php | 2 +- Magento2/Rector/Src/ReplaceMbStrposNullLimit.php | 2 +- Magento2/Rector/Src/ReplaceNewDateTimeNull.php | 2 +- Magento2/Rector/Src/ReplacePregSplitNullLimit.php | 2 +- composer.json | 2 +- composer.lock | 2 +- rector.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Magento2/Rector/Src/AddArrayAccessInterfaceReturnTypes.php b/Magento2/Rector/Src/AddArrayAccessInterfaceReturnTypes.php index a09fd34a..d7c38345 100644 --- a/Magento2/Rector/Src/AddArrayAccessInterfaceReturnTypes.php +++ b/Magento2/Rector/Src/AddArrayAccessInterfaceReturnTypes.php @@ -9,7 +9,7 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Class_; -use Rector\Core\Rector\AbstractRector; +use Rector\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; diff --git a/Magento2/Rector/Src/ReplaceMbStrposNullLimit.php b/Magento2/Rector/Src/ReplaceMbStrposNullLimit.php index 06ffaf25..06f04629 100644 --- a/Magento2/Rector/Src/ReplaceMbStrposNullLimit.php +++ b/Magento2/Rector/Src/ReplaceMbStrposNullLimit.php @@ -10,7 +10,7 @@ use PhpParser\Node; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Scalar\LNumber; -use Rector\Core\Rector\AbstractRector; +use Rector\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; diff --git a/Magento2/Rector/Src/ReplaceNewDateTimeNull.php b/Magento2/Rector/Src/ReplaceNewDateTimeNull.php index 1bf54f0a..0ddabe51 100644 --- a/Magento2/Rector/Src/ReplaceNewDateTimeNull.php +++ b/Magento2/Rector/Src/ReplaceNewDateTimeNull.php @@ -10,7 +10,7 @@ use PhpParser\Node; use PhpParser\Node\Expr\New_; use PhpParser\Node\Scalar\String_; -use Rector\Core\Rector\AbstractRector; +use Rector\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; diff --git a/Magento2/Rector/Src/ReplacePregSplitNullLimit.php b/Magento2/Rector/Src/ReplacePregSplitNullLimit.php index cc918eb4..b3f1d318 100644 --- a/Magento2/Rector/Src/ReplacePregSplitNullLimit.php +++ b/Magento2/Rector/Src/ReplacePregSplitNullLimit.php @@ -10,7 +10,7 @@ use PhpParser\Node; use PhpParser\Node\Expr\ConstFetch; use PhpParser\Node\Expr\FuncCall; -use Rector\Core\Rector\AbstractRector; +use Rector\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; diff --git a/composer.json b/composer.json index 39afe8ee..172e6b5b 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "AFL-3.0" ], "type": "phpcodesniffer-standard", - "version": "33", + "version": "34", "require": { "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "webonyx/graphql-php": "^15.0", diff --git a/composer.lock b/composer.lock index 161bea71..42089b48 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "4dcee8d6315463cd4dbfdfdb9eb65cd2", + "content-hash": "82233b04ee4b5f65e33f6cc501ed3b4e", "packages": [ { "name": "dealerdirect/phpcodesniffer-composer-installer", diff --git a/rector.php b/rector.php index 8bc53e56..bbb7a817 100644 --- a/rector.php +++ b/rector.php @@ -5,7 +5,7 @@ use Magento2\Rector\Src\ReplaceMbStrposNullLimit; use Magento2\Rector\Src\ReplaceNewDateTimeNull; use Rector\Config\RectorConfig; -use Rector\Core\ValueObject\PhpVersion; +use Rector\ValueObject\PhpVersion; use Rector\Php80\Rector\Class_\StringableForToStringRector; use Rector\Php80\Rector\ClassMethod\FinalPrivateToPrivateVisibilityRector; use Rector\CodeQuality\Rector\ClassMethod\OptionalParametersAfterRequiredRector; From df25dabc17e357e27508232eabcbb957b4a9bc53 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar Date: Mon, 18 Mar 2024 18:46:51 +0530 Subject: [PATCH 3/5] Fixed tests after update the latest versions --- rector.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/rector.php b/rector.php index bbb7a817..9b240393 100644 --- a/rector.php +++ b/rector.php @@ -18,15 +18,15 @@ $rectorConfig->phpVersion(PhpVersion::PHP_81); // get services (needed for register a single rule) - $services = $rectorConfig->services(); +// $services = $rectorConfig->services(); // register a single rule - $services->set(FinalPrivateToPrivateVisibilityRector::class); - $services->set(OptionalParametersAfterRequiredRector::class); - $services->set(SetStateToStaticRector::class); - $services->set(StringableForToStringRector::class); - $services->set(Php81ResourceReturnToObjectRector::class); - $services->set(ReplacePregSplitNullLimit::class); - $services->set(ReplaceMbStrposNullLimit::class); - $services->set(ReplaceNewDateTimeNull::class); + $rectorConfig->singleton(FinalPrivateToPrivateVisibilityRector::class); + $rectorConfig->singleton(OptionalParametersAfterRequiredRector::class); + $rectorConfig->singleton(SetStateToStaticRector::class); + $rectorConfig->singleton(StringableForToStringRector::class); + $rectorConfig->singleton(Php81ResourceReturnToObjectRector::class); + $rectorConfig->singleton(ReplacePregSplitNullLimit::class); + $rectorConfig->singleton(ReplaceMbStrposNullLimit::class); + $rectorConfig->singleton(ReplaceNewDateTimeNull::class); }; From 88f7055304450c78099c6364089b57b13d92d27d Mon Sep 17 00:00:00 2001 From: Rajesh Kumar Date: Mon, 18 Mar 2024 19:07:28 +0530 Subject: [PATCH 4/5] Fixed tests after update the latest versions --- rector.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/rector.php b/rector.php index 9b240393..bd9da885 100644 --- a/rector.php +++ b/rector.php @@ -17,9 +17,6 @@ $rectorConfig->phpVersion(PhpVersion::PHP_80); $rectorConfig->phpVersion(PhpVersion::PHP_81); - // get services (needed for register a single rule) -// $services = $rectorConfig->services(); - // register a single rule $rectorConfig->singleton(FinalPrivateToPrivateVisibilityRector::class); $rectorConfig->singleton(OptionalParametersAfterRequiredRector::class); From 33a79a65b626acba68a4ae9da584ec6ce230a5a8 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar Date: Fri, 6 Sep 2024 12:41:16 +0530 Subject: [PATCH 5/5] AC-12715::Investigate the laminas composer dependencies upgrading to latest version --- composer.json | 2 +- composer.lock | 33 ++++++++++++++++----------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/composer.json b/composer.json index 172e6b5b..300f8ddc 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "ext-simplexml": "*", "ext-dom": "*", "squizlabs/php_codesniffer": "^3.6.1", - "rector/rector": "^0.19.0", + "rector/rector": "^1.2.4", "phpcsstandards/phpcsutils": "^1.0.5", "magento/php-compatibility-fork": "^0.1" }, diff --git a/composer.lock b/composer.lock index 42089b48..96395de9 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "82233b04ee4b5f65e33f6cc501ed3b4e", + "content-hash": "05d8d7651a86d5880335013ba0dce696", "packages": [ { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -243,16 +243,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.59", + "version": "1.12.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e607609388d3a6d418a50a49f7940e8086798281" + "reference": "0ca1c7bb55fca8fe6448f16fff0f311ccec960a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e607609388d3a6d418a50a49f7940e8086798281", - "reference": "e607609388d3a6d418a50a49f7940e8086798281", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0ca1c7bb55fca8fe6448f16fff0f311ccec960a1", + "reference": "0ca1c7bb55fca8fe6448f16fff0f311ccec960a1", "shasum": "" }, "require": { @@ -295,31 +295,27 @@ { "url": "https://github.com/phpstan", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" } ], - "time": "2024-02-20T13:59:13+00:00" + "time": "2024-09-05T16:09:28+00:00" }, { "name": "rector/rector", - "version": "0.19.8", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "de3b3bb159abd704b144aa86fb244f7f1f4ac947" + "reference": "42a4aa23b48b4cfc8ebfeac2b570364e27744381" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/de3b3bb159abd704b144aa86fb244f7f1f4ac947", - "reference": "de3b3bb159abd704b144aa86fb244f7f1f4ac947", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/42a4aa23b48b4cfc8ebfeac2b570364e27744381", + "reference": "42a4aa23b48b4cfc8ebfeac2b570364e27744381", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.10.56" + "phpstan/phpstan": "^1.11.11" }, "conflict": { "rector/rector-doctrine": "*", @@ -327,6 +323,9 @@ "rector/rector-phpunit": "*", "rector/rector-symfony": "*" }, + "suggest": { + "ext-dom": "To manipulate phpunit.xml via the custom-rule command" + }, "bin": [ "bin/rector" ], @@ -349,7 +348,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/0.19.8" + "source": "https://github.com/rectorphp/rector/tree/1.2.4" }, "funding": [ { @@ -357,7 +356,7 @@ "type": "github" } ], - "time": "2024-02-05T10:59:13+00:00" + "time": "2024-08-23T09:03:01+00:00" }, { "name": "squizlabs/php_codesniffer",