parameters:
    optional_search_listeners:
        - 'oro_search.index_listener'

services:
    _defaults:
        public: true

    fidry_alice_data_fixtures.persistence.persister.doctrine.object_manager_persister:
        class: Oro\Bundle\TestFrameworkBundle\Test\DataFixtures\Persister\ObjectManagerPersister
        lazy: true
        arguments:
            - '@doctrine.orm.entity_manager'

    nelmio_alice.fixture_builder.expression_language.lexer.sub_patterns_lexer:
        class: Oro\Bundle\TestFrameworkBundle\Test\DataFixtures\Lexer\SubPatternsLexer
        arguments:
            - '@nelmio_alice.fixture_builder.expression_language.lexer.reference_lexer'

    oro_test.fixtures.reflection_property_accessor:
        class: Nelmio\Alice\PropertyAccess\ReflectionPropertyAccessor
        public: false
        decorates: nelmio_alice.property_accessor
        decoration_priority: -10
        arguments:
            - '@.inner'

    oro_test.provider.exclusion_provider:
        class: Oro\Bundle\TestFrameworkBundle\Provider\EntityExclusionProvider

    oro_test.entity_field_list_provider:
        class: Oro\Bundle\EntityBundle\Provider\EntityWithFieldsProvider
        arguments:
            - '@oro_test.entity_field_provider'
            - '@oro_test.entity_provider'
            - '@oro_entity_config.config_manager'

    oro_test.entity_field_provider:
        parent: oro_entity.entity_field_provider
        public: true
        calls:
            - [setExclusionProvider, ['@oro_test.provider.exclusion_provider']]

    oro_test.entity_provider:
        parent: oro_entity.entity_provider
        public: true
        calls:
            - [setExclusionProvider, ['@oro_test.provider.exclusion_provider']]

    oro_test.test_activity_activity_list.provider:
        class: Oro\Bundle\TestFrameworkBundle\Provider\TestActivityActivityListProvider
        arguments:
           - '@oro_entity.doctrine_helper'
           - '@oro_activity.association_helper'
        tags:
           - { name: oro_activity_list.provider, class: Oro\Bundle\TestFrameworkBundle\Entity\TestActivity }

    oro_test.entity_alias_provider:
        class: Oro\Bundle\TestFrameworkBundle\Provider\EntityAliasProvider
        public: false
        tags:
            - { name: oro_entity.alias_provider }

    oro_test.event_listener.update_user_command:
        class: Oro\Bundle\TestFrameworkBundle\EventListener\UpdateUserCommandEventListener
        arguments:
            - '@oro_user.manager'
        tags:
            - { name: kernel.event_listener, event: console.terminate, method: onConsoleTerminate }

    oro_test.alice_file_parser.yaml:
        class: Oro\Bundle\TestFrameworkBundle\Test\DataFixtures\AliceYamlParser
        decorates: nelmio_alice.file_parser.chainable.yaml
        arguments:
            - '@.inner'

    oro_test.reference_resolver:
        class: Oro\Bundle\TestFrameworkBundle\Test\DataFixtures\Resolver\AliceReferenceResolver
        public: false
        arguments:
            - '@doctrine'

    oro_test.value_resolver:
        class: Oro\Bundle\TestFrameworkBundle\Test\DataFixtures\Resolver\AliceToStringResolver
        arguments:
            - '@oro_test.reference_resolver'

    oro_test.fixture_loader.alice_combined_loader:
        class: Oro\Bundle\TestFrameworkBundle\Test\DataFixtures\Loader\AliceCombinedLoader
        lazy: true
        arguments:
            - '@nelmio_alice.files_loader.simple'
            - '@nelmio_alice.data_loader.simple'

    oro_test.fixture_loader.doctrine.persister_loader:
        class: Fidry\AliceDataFixtures\Loader\PersisterLoader
        lazy: true
        arguments:
            - '@oro_test.fixture_loader.alice_combined_loader'
            - '@fidry_alice_data_fixtures.persistence.persister.doctrine'

    oro_test.fixture_loader.doctrine.purger_loader:
        class: Fidry\AliceDataFixtures\Loader\PurgerLoader
        lazy: true
        arguments:
            - '@oro_test.fixture_loader.doctrine.persister_loader'
            - '@fidry_alice_data_fixtures.persistence.purger_factory.doctrine'
            - 'no_purge'

    oro_test.alice_fixture_loader:
        class: Oro\Bundle\TestFrameworkBundle\Test\DataFixtures\AliceFixtureLoader
        arguments:
            - '@oro_test.fixture_loader.doctrine.purger_loader'
            - '@file_locator'

    oro_test.reference_repository:
        class: Doctrine\Common\Collections\ArrayCollection
        factory: ['@oro_test.alice_fixture_loader', getReferenceRepository]

    oro_config.cache:
        parent: oro.cache.adapter.array
        public: true
        tags:
            - { name: 'cache.pool', namespace: 'oro_config' }

    oro_embedded_form.csrf_token_cache:
        class: Symfony\Component\Cache\Adapter\ArrayAdapter
        arguments:
            - '%oro_embedded_form.csrf_token_lifetime%'

    oro_wsse_authentication.nonce_cache:
        abstract: true
        class: Symfony\Component\Cache\Adapter\ArrayAdapter
        arguments:
            - '<lifetime>' # set in WsseNonceCachePass

    oro_test.transport_provider:
        class: Oro\Bundle\TestFrameworkBundle\Provider\TestTransportProvider
        tags:
            - { name: oro_integration.transport, type: aType, channel_type: aType }

    oro_test.entity_alias_loader:
        alias: oro_entity.entity_alias_loader

    oro_test.provider.container_tags_documentation_information:
        class: Oro\Bundle\TestFrameworkBundle\Provider\ContainerTagsDocumentationInformationProvider
        arguments:
            - '%kernel.project_dir%/'

    oro_search.extension.mass_action.iterable_result_factory.alias:
        alias: oro_search.extension.mass_action.iterable_result_factory

    oro_datagrid.extension.mass_action.iterable_result_factory.alias:
        alias: oro_datagrid.extension.mass_action.iterable_result_factory

    twig.form.renderer.alias:
        alias: twig.form.renderer

    oro_test.layout.data_provider.test:
        class: 'Oro\Bundle\TestFrameworkBundle\Layout\TestProvider'
        tags:
            - { name: layout.data_provider, alias: test }

    oro_test.mailer.message_logger_listener:
        decorates: mailer.message_logger_listener
        class: Oro\Bundle\TestFrameworkBundle\Mailer\EventListener\MessageLoggerListener

    oro_test.event_listener.install_option_command:
        class: Oro\Bundle\TestFrameworkBundle\EventListener\InstallOptionCommandEventListener
        arguments:
            - '@oro_test.provider.install_default_options'
        tags:
            - { name: kernel.event_listener, event: installer.initialize, method: onInitialize }

    oro_test.provider.install_default_options:
        class: Oro\Bundle\TestFrameworkBundle\Provider\InstallDefaultOptionsProvider
        public: true
        arguments:
            - !abstract '$installOptions defined in Oro\Bundle\TestFrameworkBundle\DependencyInjection\OroTestFrameworkExtension'

    oro_test.datagrid.filter.action_filter:
        class: Oro\Bundle\TestFrameworkBundle\Datagrid\Filter\ActionFilter
        public: true
