Bump to Symplify 11 (#2489)

* Bump to Symplify 11

* remove ContainerConfigurator from prefixed classes

* static fixes
This commit is contained in:
Tomas Votruba 2022-06-14 01:03:30 +02:00 committed by GitHub
parent ef4267ebf0
commit 49fc61c1ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 40 deletions

View File

@ -9,7 +9,6 @@ use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Process\Process;
use Symplify\PackageBuilder\Console\Command\CommandNaming;
require __DIR__ . '/../vendor/autoload.php';
@ -34,7 +33,7 @@ final class CleanPhpstanCommand extends Command
protected function configure(): void
{
$this->setName(CommandNaming::classToName(self::class));
$this->setName('clean-phpstan');
}
protected function execute(InputInterface $input, OutputInterface $output): int
@ -109,5 +108,5 @@ $command = new CleanPhpstanCommand();
$application = new Application();
$application->add($command);
$application->setDefaultCommand(CommandNaming::classToName($command::class), true);
$application->setDefaultCommand('clean-phpstan', true);
$application->run();

View File

@ -38,16 +38,16 @@
"symfony/dependency-injection": "6.1.*",
"symfony/finder": "6.1.*",
"symfony/string": "6.1.*",
"symplify/astral": "^10.2",
"symplify/autowire-array-parameter": "^10.2",
"symplify/composer-json-manipulator": "^10.2",
"symplify/easy-parallel": "^10.2",
"symplify/easy-testing": "^10.2",
"symplify/package-builder": "^10.2",
"symplify/rule-doc-generator-contracts": "^10.2",
"symplify/skipper": "^10.2",
"symplify/smart-file-system": "^10.2",
"symplify/symplify-kernel": "^10.2",
"symplify/astral": "^11.0",
"symplify/autowire-array-parameter": "^11.0",
"symplify/composer-json-manipulator": "^11.0",
"symplify/easy-parallel": "^11.0",
"symplify/easy-testing": "^11.0",
"symplify/package-builder": "^11.0",
"symplify/rule-doc-generator-contracts": "^11.0",
"symplify/skipper": "^11.0",
"symplify/smart-file-system": "^11.0",
"symplify/symplify-kernel": "^11.0",
"tracy/tracy": "^2.9",
"webmozart/assert": "^1.10"
},
@ -65,14 +65,13 @@
"rector/phpstan-rules": "^0.5.0",
"spatie/enum": "^3.13",
"symfony/process": "6.1.*",
"symplify/coding-standard": "^10.2",
"symplify/easy-ci": "^10.2",
"symplify/easy-coding-standard": "^10.2",
"symplify/monorepo-builder": "^10.2",
"symplify/phpstan-extensions": "^10.2",
"symplify/phpstan-rules": "^10.2",
"symplify/rule-doc-generator": "^10.2",
"symplify/vendor-patches": "^10.2"
"symplify/easy-ci": "^11.0",
"symplify/easy-coding-standard": "^11.0",
"symplify/monorepo-builder": "^11.0",
"symplify/phpstan-extensions": "^11.0",
"symplify/phpstan-rules": "^11.0",
"symplify/rule-doc-generator": "^11.0",
"symplify/vendor-patches": "^11.0"
},
"replace": {
"rector/rector": "self.version",

View File

@ -2,14 +2,14 @@
declare(strict_types=1);
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\MonorepoBuilder\Config\MBConfig;
use Symplify\MonorepoBuilder\Release\ReleaseWorker\PushTagReleaseWorker;
use Symplify\MonorepoBuilder\Release\ReleaseWorker\TagVersionReleaseWorker;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
return static function (MBConfig $mbConfig): void {
// @see https://github.com/symplify/monorepo-builder#6-release-flow
$services->set(TagVersionReleaseWorker::class);
$services->set(PushTagReleaseWorker::class);
$mbConfig->workers([
TagVersionReleaseWorker::class,
PushTagReleaseWorker::class,
]);
};

View File

@ -22,10 +22,6 @@ parameters:
# this cannot be put it, because it wipes PHPStan cache on each run :( - must run in separate
#- config
# to allow installing with various phsptan versions without reporting old errors here
bootstrapFiles:
- vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php
scanDirectories:
- stubs

View File

@ -25,7 +25,6 @@ use PhpParser\Node\Stmt\Echo_;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\Return_;
use PhpParser\Node\Stmt\Switch_;
use Rector\Core\Exception\ShouldNotHappenException;
use Rector\Core\Rector\AbstractRector;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\Php72\NodeFactory\AnonymousFunctionFactory;
@ -184,10 +183,6 @@ CODE_SAMPLE
$switchCases[] = $lastCase;
}
if (! $lastCase instanceof Case_) {
throw new ShouldNotHappenException();
}
$lastCase->stmts = $this->createSwitchStmts($node, $matchArm, $parentNode);
} else {
$stmts = $this->createSwitchStmts($node, $matchArm, $parentNode);

View File

@ -66,7 +66,6 @@ return [
// used by public API
'Symplify\SmartFileSystem\SmartFileInfo',
'Symplify\ComposerJsonManipulator\ValueObject\ComposerJson',
'Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator',
],
'expose-functions' => ['u', 'b', 's', 'trigger_deprecation'],
'expose-constants' => ['__RECTOR_RUNNING__', '#^SYMFONY\_[\p{L}_]+$#'],

View File

@ -8,14 +8,12 @@ use Composer\XdebugHandler\XdebugHandler;
use Rector\ChangesReporting\Output\ConsoleOutputFormatter;
use Rector\Core\Application\VersionResolver;
use Rector\Core\Configuration\Option;
use Rector\Core\Console\Command\ProcessCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symplify\PackageBuilder\Console\Command\CommandNaming;
final class ConsoleApplication extends Application
{
@ -32,7 +30,7 @@ final class ConsoleApplication extends Application
parent::__construct(self::NAME, VersionResolver::PACKAGE_VERSION);
$this->addCommands($commands);
$this->setDefaultCommand(CommandNaming::classToName(ProcessCommand::class));
$this->setDefaultCommand('process');
}
public function doRun(InputInterface $input, OutputInterface $output): int