<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
    <parameters>
        <parameter key="env(APP_URL_CHECK_DISABLED)" type="string">false</parameter>
    </parameters>
    <services>
        <service id="Shopware\Core\Maintenance\System\Service\DatabaseConnectionFactory"/>

        <service id="Shopware\Core\Maintenance\System\Command\SystemInstallCommand">
            <argument>%kernel.project_dir%</argument>
            <argument type="service" id="Shopware\Core\Maintenance\System\Service\SetupDatabaseAdapter"/>
            <argument type="service" id="Shopware\Core\Maintenance\System\Service\DatabaseConnectionFactory"/>
            <argument type="service" id="Shopware\Core\Framework\Adapter\Cache\CacheClearer"/>
            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\System\Command\SystemIsInstalledCommand">
            <argument type="service" id="Doctrine\DBAL\Connection"/>
            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\System\Command\SystemGenerateAppSecretCommand">
            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\System\Command\SystemSetupCommand">
            <argument>%kernel.project_dir%</argument>
            <argument type="service" id="Symfony\Component\Dotenv\Command\DotenvDumpCommand"/>
            <tag name="console.command"/>
        </service>

        <service id="Symfony\Component\Dotenv\Command\DotenvDumpCommand">
            <argument>%kernel.project_dir%</argument>
            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\System\Command\SystemUpdatePrepareCommand">
            <argument type="service" id="service_container"/>
            <argument>%kernel.shopware_version%</argument>
            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\System\Command\SystemUpdateFinishCommand">
            <argument type="service" id="event_dispatcher"/>
            <argument type="service" id="Shopware\Core\System\SystemConfig\SystemConfigService"/>
            <argument>%kernel.shopware_version%</argument>
            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\SalesChannel\Command\SalesChannelUpdateDomainCommand">
            <argument type="service" id="sales_channel_domain.repository"/>
            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\System\Command\SystemConfigureShopCommand">
            <argument type="service" id="Shopware\Core\Maintenance\System\Service\ShopConfigurator"/>
            <argument type="service" id="Shopware\Core\Framework\Adapter\Cache\CacheClearer"/>

            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\System\Service\AppUrlVerifier">
            <argument type="service" id="shopware.maintenance.client"/>
            <argument type="service" id="Doctrine\DBAL\Connection"/>
            <argument>%kernel.environment%</argument>
            <argument>%env(bool:APP_URL_CHECK_DISABLED)%</argument>
        </service>

        <service id="shopware.maintenance.client" class="GuzzleHttp\Client"/>

        <service id="Shopware\Core\Maintenance\System\Service\ShopConfigurator">
            <argument type="service" id="Doctrine\DBAL\Connection"/>
            <argument type="service" id="Symfony\Component\EventDispatcher\EventDispatcherInterface"/>
        </service>

        <service id="Shopware\Core\Maintenance\SalesChannel\Command\SalesChannelCreateCommand">
            <argument type="service" id="Shopware\Core\Maintenance\SalesChannel\Service\SalesChannelCreator"/>

            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\SalesChannel\Service\SalesChannelCreator" public="true">
            <argument type="service" id="Shopware\Core\Framework\DataAbstractionLayer\DefinitionInstanceRegistry"/>
            <argument type="service" id="sales_channel.repository"/>
            <argument type="service" id="payment_method.repository"/>
            <argument type="service" id="shipping_method.repository"/>
            <argument type="service" id="country.repository"/>
            <argument type="service" id="category.repository"/>
        </service>

        <service id="Shopware\Core\Maintenance\SalesChannel\Command\SalesChannelListCommand">
            <argument type="service" id="sales_channel.repository"/>

            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\SalesChannel\Command\SalesChannelMaintenanceEnableCommand">
            <argument type="service" id="sales_channel.repository"/>

            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\SalesChannel\Command\SalesChannelMaintenanceDisableCommand">
            <argument type="service" id="sales_channel.repository"/>

            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\User\Command\UserCreateCommand">
            <argument type="service" id="Shopware\Core\Maintenance\User\Service\UserProvisioner"/>
            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\User\Command\UserChangePasswordCommand">
            <argument type="service" id="user.repository"/>
            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\User\Command\UserListCommand">
            <argument type="service" id="user.repository"/>
            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\User\Service\UserProvisioner" public="true">
            <argument type="service" id="Doctrine\DBAL\Connection"/>
        </service>

        <service id="Shopware\Core\Maintenance\System\Service\SetupDatabaseAdapter"/>

        <service id="Shopware\Core\Maintenance\Staging\Command\SystemSetupStagingCommand">
            <argument type="service" id="event_dispatcher"/>
            <argument type="service" id="Shopware\Core\System\SystemConfig\SystemConfigService"/>
            <argument>%shopware.staging.mailing.disable_delivery%</argument>
            <argument>%shopware.staging.sales_channel.domain_rewrite%</argument>

            <tag name="console.command"/>
        </service>

        <service id="Shopware\Core\Maintenance\Staging\Handler\StagingAppHandler">
            <argument type="service" id="Doctrine\DBAL\Connection"/>
            <argument type="service" id="Shopware\Core\Framework\App\ShopId\ShopIdProvider"/>

            <tag name="kernel.event_listener"/>
        </service>

        <service id="Shopware\Core\Maintenance\Staging\Handler\StagingMailHandler">
            <argument type="service" id="Shopware\Core\System\SystemConfig\SystemConfigService"/>

            <tag name="kernel.event_listener"/>
        </service>

        <service id="Shopware\Core\Maintenance\Staging\Handler\StagingSalesChannelHandler">
            <argument type="service" id="Doctrine\DBAL\Connection"/>

            <tag name="kernel.event_listener"/>
        </service>
    </services>
</container>
