Skip to main content
1 of 2
4uk4
  • 101.7k
  • 7
  • 173
  • 217

If you have the same container parameter name in different modules the module last in alphabetic order will overwrite previous values.

But why use parameters when you can use string literals?

my_module_nodes.services.yml

services:
  my_module_nodes.subscriber:
    class: \Drupal\my_module_nodes\EventSubscriber\MyModuleNodesSubscriber
    arguments: ['@cache.render', '@current_route_match', 'entity.node.canonical', 'node']
    tags:
    - { name: event_subscriber }
4uk4
  • 101.7k
  • 7
  • 173
  • 217