Skip to content

Commit

Permalink
Version 24 (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaschenko authored Jun 14, 2022
1 parent e69b7f8 commit 1fc3c9d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 125 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"AFL-3.0"
],
"type": "phpcodesniffer-standard",
"version": "23",
"version": "24",
"require": {
"php": ">=7.3",
"webonyx/graphql-php": "^14.9",
Expand Down
148 changes: 33 additions & 115 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions phpunit-bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 5 additions & 9 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,21 @@

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;
use Rector\CodeQuality\Rector\ClassMethod\OptionalParametersAfterRequiredRector;
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);
Expand Down

0 comments on commit 1fc3c9d

Please sign in to comment.