From 1fc3c9de6e84c0577697dd1ff49459a7f01b37ca Mon Sep 17 00:00:00 2001 From: Sergii Ivashchenko Date: Tue, 14 Jun 2022 14:51:20 +0100 Subject: [PATCH] Version 24 (#185) --- composer.json | 2 +- composer.lock | 148 ++++++++++-------------------------------- phpunit-bootstrap.php | 7 ++ rector.php | 14 ++-- 4 files changed, 46 insertions(+), 125 deletions(-) diff --git a/composer.json b/composer.json index b345fb0a..87ce22fe 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "AFL-3.0" ], "type": "phpcodesniffer-standard", - "version": "23", + "version": "24", "require": { "php": ">=7.3", "webonyx/graphql-php": "^14.9", diff --git a/composer.lock b/composer.lock index 63cc9b1c..167507c3 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": "5929082e101a2921524f8ded269292d8", + "content-hash": "648f4cf3962dc24fb1bdd135071b61bb", "packages": [ { "name": "phpcompatibility/php-compatibility", @@ -70,16 +70,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.7.7", + "version": "1.7.13", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "cadad14ac63d8a432e01ae89ac5d0ff6fc3b16ab" + "reference": "86ffc063bfd8f264c9eba568e84b0225a6090d09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cadad14ac63d8a432e01ae89ac5d0ff6fc3b16ab", - "reference": "cadad14ac63d8a432e01ae89ac5d0ff6fc3b16ab", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/86ffc063bfd8f264c9eba568e84b0225a6090d09", + "reference": "86ffc063bfd8f264c9eba568e84b0225a6090d09", "shasum": "" }, "require": { @@ -105,7 +105,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.7.7" + "source": "https://github.com/phpstan/phpstan/tree/1.7.13" }, "funding": [ { @@ -125,25 +125,25 @@ "type": "tidelift" } ], - "time": "2022-05-31T13:58:21+00:00" + "time": "2022-06-13T15:15:39+00:00" }, { "name": "rector/rector", - "version": "0.13.3", + "version": "0.13.5", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "38c15a123c19748af5c3c2fd011ba105ce34a9e7" + "reference": "4170aad2943b150149ba9594c34539e06ced6c6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/38c15a123c19748af5c3c2fd011ba105ce34a9e7", - "reference": "38c15a123c19748af5c3c2fd011ba105ce34a9e7", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/4170aad2943b150149ba9594c34539e06ced6c6b", + "reference": "4170aad2943b150149ba9594c34539e06ced6c6b", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.7.6" + "phpstan/phpstan": "^1.7.10" }, "conflict": { "phpstan/phpdoc-parser": "<1.2", @@ -177,7 +177,7 @@ "description": "Instant Upgrade and Automated Refactoring of any PHP code", "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/0.13.3" + "source": "https://github.com/rectorphp/rector/tree/0.13.5" }, "funding": [ { @@ -185,20 +185,20 @@ "type": "github" } ], - "time": "2022-05-31T12:26:36+00:00" + "time": "2022-06-09T12:54:02+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.6.2", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" + "reference": "a2cd51b45bcaef9c1f2a4bda48f2dd2fa2b95563" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/a2cd51b45bcaef9c1f2a4bda48f2dd2fa2b95563", + "reference": "a2cd51b45bcaef9c1f2a4bda48f2dd2fa2b95563", "shasum": "" }, "require": { @@ -241,7 +241,7 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2021-12-12T21:44:58+00:00" + "time": "2022-06-13T06:31:38+00:00" }, { "name": "webonyx/graphql-php", @@ -442,16 +442,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.2", + "version": "v4.14.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", "shasum": "" }, "require": { @@ -492,9 +492,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" }, - "time": "2021-11-30T19:35:32+00:00" + "time": "2022-05-31T20:59:12+00:00" }, { "name": "phar-io/manifest", @@ -2219,88 +2219,6 @@ ], "time": "2020-09-28T06:39:44+00:00" }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-10-20T20:35:02+00:00" - }, { "name": "theseer/tokenizer", "version": "1.2.1", @@ -2353,21 +2271,21 @@ }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -2405,9 +2323,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], diff --git a/phpunit-bootstrap.php b/phpunit-bootstrap.php index 2cf8c7f6..487e0170 100644 --- a/phpunit-bootstrap.php +++ b/phpunit-bootstrap.php @@ -25,6 +25,13 @@ define('PHP_CODESNIFFER_VERBOSITY', 0); } +/** + * Define PHP 8.1 tokens + */ +if (!defined('T_READONLY')) { + define('T_READONLY', 42401); +} + $ds = DIRECTORY_SEPARATOR; // Get the PHPCS dir from an environment variable. diff --git a/rector.php b/rector.php index afe7adc8..8bc53e56 100644 --- a/rector.php +++ b/rector.php @@ -4,7 +4,7 @@ use Magento2\Rector\Src\ReplaceMbStrposNullLimit; use Magento2\Rector\Src\ReplaceNewDateTimeNull; -use Rector\Core\Configuration\Option; +use Rector\Config\RectorConfig; use Rector\Core\ValueObject\PhpVersion; use Rector\Php80\Rector\Class_\StringableForToStringRector; use Rector\Php80\Rector\ClassMethod\FinalPrivateToPrivateVisibilityRector; @@ -12,17 +12,13 @@ use Rector\Php80\Rector\ClassMethod\SetStateToStaticRector; use Rector\Php81\Rector\FuncCall\Php81ResourceReturnToObjectRector; use Magento2\Rector\Src\ReplacePregSplitNullLimit; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; -return static function (ContainerConfigurator $containerConfigurator): void { - // get parameters - $parameters = $containerConfigurator->parameters(); - - $parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_80); - $parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_81); +return static function (RectorConfig $rectorConfig): void { + $rectorConfig->phpVersion(PhpVersion::PHP_80); + $rectorConfig->phpVersion(PhpVersion::PHP_81); // get services (needed for register a single rule) - $services = $containerConfigurator->services(); + $services = $rectorConfig->services(); // register a single rule $services->set(FinalPrivateToPrivateVisibilityRector::class);