services:
    _defaults:
        autoconfigure: true

    _instanceof:
        Contao\CoreBundle\Framework\FrameworkAwareInterface:
            calls:
                - [setFramework, ['@contao.framework']]

    contao.command.automator:
        class: Contao\CoreBundle\Command\AutomatorCommand
        arguments:
            - '@contao.framework'

    contao.command.backup_create:
        class: Contao\CoreBundle\Command\Backup\BackupCreateCommand
        arguments:
            - '@contao.doctrine.backup_manager'

    contao.command.backup_list:
        class: Contao\CoreBundle\Command\Backup\BackupListCommand
        arguments:
            - '@contao.doctrine.backup_manager'

    contao.command.backup_restore:
        class: Contao\CoreBundle\Command\Backup\BackupRestoreCommand
        arguments:
            - '@contao.doctrine.backup_manager'

    contao.command.backup_stream_content:
        class: Contao\CoreBundle\Command\Backup\BackupStreamContentCommand
        arguments:
            - '@contao.doctrine.backup_manager'

    contao.command.crawl:
        class: Contao\CoreBundle\Command\CrawlCommand
        arguments:
            - '@contao.crawl.escargot.factory'
            - '@filesystem'

    contao.command.cron:
        class: Contao\CoreBundle\Command\CronCommand
        arguments:
            - '@contao.cron'

    contao.command.cron_list:
        class: Contao\CoreBundle\Command\CronListCommand
        arguments:
            - '@contao.cron'

    contao.command.debug_dca:
        class: Contao\CoreBundle\Command\DebugDcaCommand
        arguments:
            - '@contao.framework'

    contao.command.debug_fragments:
        class: Contao\CoreBundle\Command\DebugFragmentsCommand
        arguments:
            - '@contao.fragment.registry'
            - '@service_container'

    contao.command.debug_pages:
        class: Contao\CoreBundle\Command\DebugPagesCommand
        arguments:
            - '@contao.framework'
            - '@contao.routing.page_registry'

    contao.command.debug_twig:
        class: Contao\CoreBundle\Command\DebugContaoTwigCommand
        arguments:
            - '@contao.twig.filesystem_loader'
            - '@contao.twig.loader.theme_namespace'
            - '%kernel.project_dir%'
            - '@contao.twig.inspector'

    contao.command.filesync:
        class: Contao\CoreBundle\Command\FilesyncCommand
        arguments:
            - '@contao.filesystem.dbafs_manager'

    contao.command.install:
        class: Contao\CoreBundle\Command\InstallCommand
        public: true
        arguments:
            - '%kernel.project_dir%'
            - '%contao.upload_path%'

    contao.command.migrate:
        class: Contao\CoreBundle\Command\MigrateCommand
        arguments:
            - '@contao.migration.command_compiler'
            - '@database_connection'
            - '@contao.migration.collection'
            - '@contao.doctrine.backup_manager'
            - '@contao.doctrine.schema.mysql_innodb_row_size_calculator'

    contao.command.resize_images:
        class: Contao\CoreBundle\Command\ResizeImagesCommand
        arguments:
            - '@contao.image.factory'
            - '@contao.image.resizer'
            - '%contao.image.target_dir%'
            - '@contao.image.deferred_image_storage'
            - '@?filesystem'

    contao.command.supervise_workers:
        class: Contao\CoreBundle\Command\SuperviseWorkersCommand
        arguments:
            - '@messenger.receiver_locator'
            - '@contao.process_util'
            - '@database_connection'
            - !abstract set by ContaoCoreExtension::handleMessengerConfig()
            - !abstract set by ContaoCoreExtension::handleMessengerConfig()

    contao.command.symlinks:
        class: Contao\CoreBundle\Command\SymlinksCommand
        public: true
        arguments:
            - '%kernel.project_dir%'
            - '%contao.upload_path%'
            - '%kernel.logs_dir%'
            - '@contao.resource_finder'
            - '@event_dispatcher'

    contao.command.user_create:
        class: Contao\CoreBundle\Command\UserCreateCommand
        arguments:
            - '@contao.framework'
            - '@database_connection'
            - '@security.password_hasher_factory'
            - '@contao.intl.locales'

    contao.command.user_list:
        class: Contao\CoreBundle\Command\UserListCommand
        arguments:
            - '@database_connection'

    contao.command.user_password:
        class: Contao\CoreBundle\Command\UserPasswordCommand
        arguments:
            - '@contao.framework'
            - '@database_connection'
            - '@security.password_hasher_factory'
