services:
    pim_catalog.event_subscriber.add_unique_attributes_to_variant_product_attribute_set:
        class: 'Akeneo\Pim\Structure\Bundle\EventSubscriber\AddUniqueAttributesToVariantProductAttributeSetSubscriber'
        arguments:
            - '@pim_catalog.family_variant.add_unique_attributes'
        tags:
            - { name: kernel.event_subscriber }

    pim_catalog.event_subscriber.compute_family_variant_structure_changes:
        class: 'Akeneo\Pim\Structure\Bundle\EventSubscriber\ComputeFamilyVariantStructureChangesSubscriber'
        arguments:
            - '@security.token_storage'
            - '@akeneo_batch_queue.launcher.queue_job_launcher'
            - '@akeneo_batch.job.job_instance_repository'
            - '@database_connection'
            - '@logger'
            - '%pim_catalog.compute_family_variant_structure_changes.job_name%'
        tags:
            - { name: kernel.event_subscriber }

    pim_catalog.event_subscriber.remove_attributes_from_family_variants_on_family_update:
        class: 'Akeneo\Pim\Structure\Bundle\EventSubscriber\RemoveAttributesFromFamilyVariantsOnFamilyUpdateSubscriber'
        tags:
            - { name: kernel.event_subscriber }

    pim_catalog.event_subscriber.attribute_removal:
        class: 'Akeneo\Pim\Structure\Bundle\EventSubscriber\AttributeRemovalSubscriber'
        arguments:
            - '@pim_catalog.manager.attribute_code_blacklister'
            - '@akeneo_batch_queue.launcher.queue_job_launcher'
            - '@akeneo_batch.job.job_instance_repository'
            - '@security.token_storage'
        tags:
            - { name: kernel.event_subscriber }

    pim_catalog.event_subscriber.save_family_variants_on_family_update:
        class: 'Akeneo\Pim\Structure\Bundle\EventSubscriber\SaveFamilyVariantOnFamilyUpdateSubscriber'
        arguments:
            - '@validator'
            - '@pim_catalog.saver.family_variant'
            - '@pim_catalog.saver.family_variant'
        tags:
            - { name: kernel.event_subscriber }

    pim_catalog.event_subscriber.remove_family_from_job_instance_filters_on_family_deletion:
        class: Akeneo\Pim\Structure\Bundle\EventSubscriber\RemoveFamilyFromJobInstanceFiltersOnFamilyDeletionSubscriber
        arguments:
            - '@doctrine.orm.entity_manager'
            - '@akeneo_batch.saver.job_instance'
        tags:
            - { name: kernel.event_subscriber }

    pim_enrich.event_listener.remove_attribute_filter_in_job_instances:
        class: Akeneo\Pim\Structure\Bundle\EventSubscriber\RemoveAttributeFiltersInJobInstancesOnAttributeDeletion
        arguments:
            - '@akeneo_batch.job.job_instance_repository'
            - '@akeneo_batch.saver.job_instance'
        tags:
            - { name: kernel.event_subscriber }

    pim_catalog.event_subscriber.create_attribute_requirement:
        class: 'Akeneo\Pim\Structure\Bundle\EventSubscriber\CreateAttributeRequirementSubscriber'
        arguments:
            - '@pim_catalog.factory.attribute_requirement'
        tags:
            - { name: doctrine.event_subscriber }

    Akeneo\Pim\Structure\Bundle\EventSubscriber\ApiAggregatorForAttributePostSaveEventSubscriber:
        arguments:
            - '@event_dispatcher'
        tags:
            - { name: kernel.event_subscriber }

    Akeneo\Pim\Structure\Bundle\EventSubscriber\ApiAggregatorForAttributeOptionPostSaveEventSubscriber:
        arguments:
            - '@event_dispatcher'
        tags:
            - { name: kernel.event_subscriber }

    pim_catalog.event_subscriber.check_attribute_on_deletion_subscriber:
        class: 'Akeneo\Pim\Structure\Bundle\EventSubscriber\CheckAttributeOnDeletionSubscriber'
        arguments:
            - '@database_connection'
        tags:
            - { name: kernel.event_subscriber }
