services:
  plugin.manager.features_assignment_method:
    class: Drupal\features\FeaturesAssignmentMethodManager
    arguments: ['@container.namespaces', '@cache.discovery', '@module_handler']
  plugin.manager.features_generation_method:
    class: Drupal\features\FeaturesGenerationMethodManager
    arguments: ['@container.namespaces', '@cache.discovery', '@module_handler']
  features_assigner:
    class: Drupal\features\FeaturesAssigner
    arguments: ['@features.manager', '@plugin.manager.features_assignment_method', '@entity_type.manager', '@config.factory', '@config.storage', '%install_profile%', '@request_stack']
    calls:
      - [initFeaturesManager]
  features_generator:
    class: Drupal\features\FeaturesGenerator
    arguments: ['@features.manager', '@plugin.manager.features_generation_method', '@features_assigner', '@messenger', '@logger.channel.features']
    calls:
      - [initFeaturesManager]
  features.manager:
    class: Drupal\features\FeaturesManager
    arguments: ['%app.root%', '@entity_type.manager', '@config.factory', '@config.storage', '@config.manager', '@module_handler', '@features.config_update', '@extension.list.module', '@extension.path.resolver']

  features.config_update:
    class: Drupal\config_update\ConfigReverter
    arguments: ['@entity_type.manager', '@config.storage', '@features.extension_storage', '@features.extension_optional_storage', '@config.factory', '@event_dispatcher']

  features.extension_storage:
    class: Drupal\features\FeaturesInstallStorage
    arguments: ['@config.storage', '@extension.path.resolver']

  features.extension_optional_storage:
    class: Drupal\features\FeaturesInstallStorage
    arguments: ['@config.storage', '@extension.path.resolver', 'config/optional']

  features.config.installer:
    class: Drupal\features\FeaturesConfigInstaller
    decorates: config.installer
    arguments:
      - '@features.config.installer.inner'
      - '@features.manager'
      - '@config.factory'
      - '@config.storage'
      - '@config.typed'
      - '@config.manager'
      - '@event_dispatcher'
      - '%install_profile%'
      - '@extension.path.resolver'
    decoration_priority: 9

  logger.channel.features:
    parent: logger.channel_base
    arguments: ['features']
