Install fails with the following error:
TypeError: Drupal\Component\DependencyInjection\ReverseContainer::generateServiceIdHash(): Argument #1 ($object) must be of type object, null given in /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/ReverseContainer.php on line 87 #0 [internal function]: Drupal\Component\DependencyInjection\ReverseContainer->generateServiceIdHash()
#1 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/ReverseContainer.php(75): array_map()
#2 /var/www/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(885): Drupal\Component\DependencyInjection\ReverseContainer->recordContainer()
#3 /var/www/drupal/vendor/drush/drush/src/Drupal/DrupalKernelTrait.php(70): Drupal\Core\DrupalKernel->initializeContainer()
#4 /var/www/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(798): Drush\Drupal\DrupalKernel->initializeContainer()
#5 /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php(600): Drupal\Core\DrupalKernel->updateModules()
#6 /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php(236): Drupal\Core\Extension\ModuleInstaller->updateKernel()
#7 /var/www/drupal/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install()
#8 /var/www/drupal/vendor/drush/drush/src/Drupal/Commands/pm/PmCommands.php(94): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install()
#9 [internal function]: Drush\Drupal\Commands\pm\PmCommands->install()
#10 /var/www/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()
#11 /var/www/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#12 /var/www/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#13 /var/www/drupal/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process()
#14 /var/www/drupal/vendor/symfony/console/Command/Command.php(312): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#15 /var/www/drupal/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#16 /var/www/drupal/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand()
#17 /var/www/drupal/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun()
#18 /var/www/drupal/vendor/drush/drush/src/Runtime/Runtime.php(124): Symfony\Component\Console\Application->run()
#19 /var/www/drupal/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun()
#20 /var/www/drupal/vendor/drush/drush/drush.php(77): Drush\Runtime\Runtime->run()
#21 /var/www/drupal/vendor/drush/drush/includes/preflight.inc(18): require('...')
#22 phar:///usr/local/bin/drush/bin/drush.php(143): drush_main()
#23 /usr/local/bin/drush(14): require('...')
#24 {main}
TypeError: Drupal\Component\DependencyInjection\ReverseContainer::generateServiceIdHash(): Argument #1 ($object) must be of type object, null given in Drupal\Component\DependencyInjection\ReverseContainer->generateServiceIdHash() (line 87 of /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/ReverseContainer.php).
On Drupal 10.0.9 and PHP 8.1.18 run:
composer require drupal/keyboard_shortcuts && drush en -y keyboard_shortcuts
Fixed
1.1
Code