Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Updated: Comment 0
Problem/Motivation
If you try to write a ServiceModifier without being a ServiceProvider you end up in:
PHP Fatal error: Call to undefined method Drupal\twig_routing\TwigRoutingServiceProvider::register() in /var/www/d8/core/lib/Drupal/Core/DrupalKernel.php on line 518
PHP Stack trace:
PHP 1. {main}() /home/dawehner/config/bin/drush/drush.php:0
PHP 2. drush_main() /home/dawehner/config/bin/drush/drush.php:16
PHP 3. _drush_bootstrap_and_dispatch() /home/dawehner/config/bin/drush/drush.php:61
PHP 4. drush_dispatch() /home/dawehner/config/bin/drush/drush.php:92
PHP 5. call_user_func_array() /home/dawehner/config/bin/drush/includes/command.inc:182
PHP 6. drush_command() /home/dawehner/config/bin/drush/includes/command.inc:182
PHP 7. _drush_invoke_hooks() /home/dawehner/config/bin/drush/includes/command.inc:214
PHP 8. call_user_func_array() /home/dawehner/config/bin/drush/includes/command.inc:362
PHP 9. drush_pm_enable() /home/dawehner/config/bin/drush/includes/command.inc:362
PHP 10. drush_module_enable() /home/dawehner/config/bin/drush/commands/pm/pm.drush.inc:1013
PHP 11. module_install() /home/dawehner/config/bin/drush/commands/core/drupal/environment.inc:148
PHP 12. Drupal\Core\Extension\ModuleHandler->install() /var/www/d8/core/includes/module.inc:211
PHP 13. Drupal\Core\DrupalKernel->updateModules() /var/www/d8/core/lib/Drupal/Core/Extension/ModuleHandler.php:613
PHP 14. Drupal\Core\DrupalKernel->boot() /var/www/d8/core/lib/Drupal/Core/DrupalKernel.php:331
PHP 15. Drupal\Core\DrupalKernel->initializeContainer() /var/www/d8/core/lib/Drupal/Core/DrupalKernel.php:176
PHP 16. Drupal\Core\DrupalKernel->buildContainer() /var/www/d8/core/lib/Drupal/Core/DrupalKernel.php:427
Proposed resolution
Remaining tasks
User interface changes
API changes
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#1 | kernel-2118763-1.patch | 1014 bytes | dawehner |
Comments
Comment #1
dawehner.
Comment #2
BerdirSee #1988508: Stop pretending we support Symfony bundles when we really just have service providers, which was re-opened due to this but never resolved.
Comment #3
dawehnerLet's mark this issue as duplicate.