diff --git a/src/Command/Extension/PathCommand.php b/src/Command/Extension/PathCommand.php
index 39741f9..f95735d 100644
--- a/src/Command/Extension/PathCommand.php
+++ b/src/Command/Extension/PathCommand.php
@@ -22,7 +22,7 @@ use Symfony\Component\DependencyInjection\Attribute\Autowire;
 final class PathCommand extends CtxCommandBase {
 
   public function __construct(
-    #[Autowire('%app.root%')]
+    #[Autowire(param: 'app.root')]
     private readonly string $appRoot,
     private readonly ModuleExtensionList $moduleExtensionList,
     private readonly ThemeExtensionList $themeExtensionList,
diff --git a/src/Command/Skill/InstallCommand.php b/src/Command/Skill/InstallCommand.php
index fbe21f6..fc45383 100644
--- a/src/Command/Skill/InstallCommand.php
+++ b/src/Command/Skill/InstallCommand.php
@@ -29,7 +29,7 @@ final class InstallCommand extends CtxCommandBase {
 
   public function __construct(
     private readonly ModuleExtensionList $moduleExtensionList,
-    #[Autowire('%app.root%')]
+    #[Autowire(param: 'app.root')]
     private readonly string $appRoot,
   ) {
     parent::__construct();
diff --git a/tests/src/Kernel/Command/CtxCommandBaseTest.php b/tests/src/Kernel/Command/CtxCommandBaseTest.php
index d5e20af..bbd5e9e 100644
--- a/tests/src/Kernel/Command/CtxCommandBaseTest.php
+++ b/tests/src/Kernel/Command/CtxCommandBaseTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\ctx\Kernel\Command;
 
+use Symfony\Component\Console\Attribute\AsCommand;
 use Drupal\ctx\Command\CtxCommandBase;
 use Drupal\ctx\Command\CtxCommandException;
 use Drupal\KernelTests\KernelTestBase;
@@ -93,10 +94,9 @@ final class CtxCommandBaseTest extends KernelTestBase {
    * Creates a tester for a minimal command built on the base class.
    */
   private function createTester(): CommandTester {
-    $command = new class() extends CtxCommandBase {
+    $command = new #[AsCommand(name: 'ctx:test:base')] class() extends CtxCommandBase {
 
       protected function configure(): void {
-        $this->setName('ctx:test:base');
         $this->addJsonOption('data', 'Arbitrary data.');
         $this->addJsonOption('other', 'Another document.');
         $this->addOption('fail');
