From bd8359ccfad27c136905559cd46d08dd46c14769 Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Sun, 29 Mar 2026 12:47:49 -0400 Subject: [PATCH 1/2] Symfony 8 - use addCommand() --- composer.json | 17 +++++++++-------- src/Application.php | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 61950e1c..cd44d759 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,8 @@ "config": { "sort-packages": true, "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "drupal/core-composer-scaffold": true } }, "require": { @@ -27,10 +28,10 @@ "ext-json": "*", "psr/event-dispatcher": "^1.0", "psr/log": "^3.0", - "symfony/console": "^7.1 || ^8", - "symfony/dependency-injection": "^7.1 || ^8", - "symfony/filesystem": "^7.1 || ^8", - "symfony/string": "^7.0 || ^8", + "symfony/console": "^7.4 || ^8", + "symfony/dependency-injection": "^7.4 || ^8", + "symfony/filesystem": "^7.4 || ^8", + "symfony/string": "^7.4 || ^8", "twig/twig": "^3.4" }, "require-dev": { @@ -41,14 +42,14 @@ "phpspec/prophecy-phpunit": "^2.2", "phpunit/phpunit": "^10.5", "squizlabs/php_codesniffer": "^3.9", - "symfony/var-dumper": "^7.1 || ^8", - "symfony/yaml": "^7.1 || ^8", + "symfony/var-dumper": "^7.4 || ^8", + "symfony/yaml": "^7.4 || ^8", "vimeo/psalm": "^5.24.0" }, "conflict": { "squizlabs/php_codesniffer": "<3.6", "nikic/php-parser": "<4.17" }, - "minimum-stability": "RC", + "minimum-stability": "dev", "prefer-stable": true } diff --git a/src/Application.php b/src/Application.php index 350c280b..0fa7080c 100644 --- a/src/Application.php +++ b/src/Application.php @@ -113,7 +113,7 @@ public static function create(ContainerInterface $container): self { $application->dispatch(new GeneratorInfoAlter($all_generators))->generators, ); - $application->add(new Navigation()); + $application->addCommand(new Navigation()); $application->setDefaultCommand('navigation'); /** @var \DrupalCodeGenerator\Application $application */ From 61b4def7b18520964699963862c0cf37f74dffa7 Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Sun, 29 Mar 2026 12:53:43 -0400 Subject: [PATCH 2/2] Another addCommand() --- src/Test/Functional/GeneratorTestBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Test/Functional/GeneratorTestBase.php b/src/Test/Functional/GeneratorTestBase.php index feaf140a..49f12c33 100644 --- a/src/Test/Functional/GeneratorTestBase.php +++ b/src/Test/Functional/GeneratorTestBase.php @@ -42,7 +42,7 @@ protected function execute(string $command_class, array $user_input): int { ->getInstanceFromDefinition($command_class); \assert($command instanceof Command); - $application->add($command); + $application->addCommand($command); $command_tester = new CommandTester($command); /** @psalm-var int<0, 1> $result */