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/Config/ImportCommandTest.php b/tests/src/Kernel/Command/Config/ImportCommandTest.php
index 08eaa03..62e0de9 100644
--- a/tests/src/Kernel/Command/Config/ImportCommandTest.php
+++ b/tests/src/Kernel/Command/Config/ImportCommandTest.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
 
 namespace Drupal\Tests\ctx\Kernel\Command\Config;
 
+use Drupal\Component\Utility\DeprecationHelper;
+use Drupal\Core\Extension\ModuleWeight;
 use Drupal\Core\Config\ConfigEvents;
 use Drupal\Core\Config\ConfigImporterEvent;
 use Drupal\Core\Config\StorageInterface;
@@ -47,7 +49,7 @@ final class ImportCommandTest extends CommandKernelTestBase {
     $extension = $this->activeStorage()->read('core.extension');
     \assert(\is_array($extension));
     \assert(\is_array($extension['module']));
-    $extension['module'] = \module_config_sort($extension['module']);
+    $extension['module'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.5.0', fn() => \Drupal::service(ModuleWeight::class)->sort($extension['module']), fn() => \module_config_sort($extension['module']));
     $this->activeStorage()->write('core.extension', $extension);
   }
 
