services:
  _defaults:
    autowire: true

  automatic_updates.route_subscriber:
    class: Drupal\automatic_updates\Routing\RouteSubscriber
    tags:
      - { name: event_subscriber }
  automatic_updates.status_checker:
    class: Drupal\automatic_updates\Validation\StatusChecker
    arguments:
      # @todo Remove this when https://drupal.org/i/3325557 lands.
      $key_value_expirable_factory: '@keyvalue.expirable'
      $resultsTimeToLive: 24
    tags:
      - { name: event_subscriber }
  Drupal\automatic_updates\Validation\StatusChecker: '@automatic_updates.status_checker'
  automatic_updates.status_check_mailer:
    class: Drupal\automatic_updates\StatusCheckMailer
  Drupal\automatic_updates\StatusCheckMailer: '@automatic_updates.status_check_mailer'
  automatic_updates.update_stage:
    class: Drupal\automatic_updates\UpdateStage
    calls:
      - ['setLogger', ['@logger.channel.automatic_updates']]
  Drupal\automatic_updates\UpdateStage: '@automatic_updates.update_stage'
  automatic_updates.cron_update_stage:
    class: Drupal\automatic_updates\CronUpdateStage
    calls:
      - ['setLogger', ['@logger.channel.automatic_updates']]
    arguments:
      $inner: '@automatic_updates.cron_update_stage.inner'
    decorates: 'cron'
  Drupal\automatic_updates\CronUpdateStage: '@automatic_updates.cron_update_stage'
  automatic_updates.requested_update_validator:
    class: Drupal\automatic_updates\Validator\RequestedUpdateValidator
    tags:
      - { name: event_subscriber }
  automatic_updates.staged_projects_validator:
    class: Drupal\automatic_updates\Validator\StagedProjectsValidator
    tags:
      - { name: event_subscriber }
  Drupal\automatic_updates\Validator\StagedProjectsValidator: '@automatic_updates.staged_projects_validator'
  automatic_updates.release_chooser:
    class: Drupal\automatic_updates\ReleaseChooser
    arguments:
      - '@automatic_updates.validator.version_policy'
  Drupal\automatic_updates\ReleaseChooser: '@automatic_updates.release_chooser'
  automatic_updates.cron_frequency_validator:
    class: Drupal\automatic_updates\Validator\CronFrequencyValidator
    arguments:
      $lock: '@lock'
    tags:
      - { name: event_subscriber }
  automatic_updates.validator.staged_database_updates:
    class: Drupal\automatic_updates\Validator\StagedDatabaseUpdateValidator
    tags:
      - { name: event_subscriber }
  automatic_updates.validator.version_policy:
    class: Drupal\automatic_updates\Validator\VersionPolicyValidator
    tags:
      - { name: event_subscriber }
  Drupal\automatic_updates\Validator\VersionPolicyValidator: '@automatic_updates.validator.version_policy'
  logger.channel.automatic_updates:
    parent: logger.channel_base
    arguments: ['automatic_updates']
  Drupal\automatic_updates\DrushUpdateStage:
    arguments:
      $lock: '@lock'
      $committer: '@Drupal\automatic_updates\MaintenanceModeAwareCommitter'
    calls:
      - ['setLogger', ['@logger.channel.automatic_updates']]
  Drupal\automatic_updates\MaintenanceModeAwareCommitter:
    tags:
      - { name: event_subscriber }
