From 284d595b2e5471fc1cb32803e512734a694401c4 Mon Sep 17 00:00:00 2001 From: maxperei Date: Wed, 2 Jul 2025 10:28:00 +0200 Subject: [PATCH] chore(di): [autowire] prefer class name instead of tag id --- .../Asset/Attribute/AssetAttributeValueBuilderInterface.php | 4 +--- src/Builder/Attribute/ProductAttributeValueValueBuilder.php | 2 +- .../Attribute/ProductAttributeValueValueBuilderInterface.php | 4 +--- .../ProductOptionValue/DynamicOptionValueBuilderInterface.php | 4 +--- src/Builder/ProductOptionValue/ProductOptionValueBuilder.php | 2 +- .../ProductOptionValueTranslationBuilder.php | 2 +- .../ProductOptionValueTranslationBuilderInterface.php | 4 +--- src/Builder/TaxonAttribute/TaxonAttributeValueBuilder.php | 2 +- .../TaxonAttribute/TaxonAttributeValueBuilderInterface.php | 4 +--- src/Processor/Category/CategoryProcessorChain.php | 2 +- src/Processor/Category/CategoryProcessorInterface.php | 4 +--- src/Processor/Product/ProductProcessorChain.php | 2 +- src/Processor/Product/ProductProcessorInterface.php | 4 +--- .../ProductAttribute/AkeneoAttributeProcessorInterface.php | 4 +--- .../ReferenceEntityAttributeValueProcessorInterface.php | 4 +--- .../Table/TableProductAttributeValueProcessorInterface.php | 4 +--- .../ProductOptionValue/OptionValuesProcessorInterface.php | 4 +--- src/Processor/ProductVariant/ProductVariantProcessorChain.php | 2 +- .../ProductVariant/ProductVariantProcessorInterface.php | 4 +--- src/Provider/AkeneoAttributeProcessorProvider.php | 2 +- src/Provider/Asset/AssetAttributeTypeMatcherProvider.php | 2 +- src/Provider/Asset/AssetValueBuilderProvider.php | 2 +- src/Provider/ChainOptionValuesProcessorProvider.php | 2 +- .../TableAttributeValueProcessorProvider.php | 2 +- .../ProductRefEntityAttributeValueValueBuilderProvider.php | 2 +- src/Transformer/DataMigration/DataMigrationTransformer.php | 2 +- .../DataMigration/DataMigrationTransformerInterface.php | 4 +--- .../Asset/Attribute/AssetAttributeTypeMatcherInterface.php | 3 +-- src/TypeMatcher/Attribute/AttributeTypeMatcher.php | 2 +- src/TypeMatcher/Attribute/AttributeTypeMatcherInterface.php | 3 +-- .../ReferenceEntityAttributeTypeMatcher.php | 2 +- .../ReferenceEntityAttributeTypeMatcherInterface.php | 2 -- src/TypeMatcher/TaxonAttribute/TaxonAttributeTypeMatcher.php | 2 +- .../TaxonAttribute/TaxonAttributeTypeMatcherInterface.php | 4 +--- 34 files changed, 33 insertions(+), 65 deletions(-) diff --git a/src/Builder/Asset/Attribute/AssetAttributeValueBuilderInterface.php b/src/Builder/Asset/Attribute/AssetAttributeValueBuilderInterface.php index 4d9b2134..b0e1f6d9 100644 --- a/src/Builder/Asset/Attribute/AssetAttributeValueBuilderInterface.php +++ b/src/Builder/Asset/Attribute/AssetAttributeValueBuilderInterface.php @@ -6,11 +6,9 @@ use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface AssetAttributeValueBuilderInterface { - public const TAG_ID = 'sylius.akeneo.asset_value_builder'; - public function support(string $assetFamilyCode, string $attributeCode): bool; /** diff --git a/src/Builder/Attribute/ProductAttributeValueValueBuilder.php b/src/Builder/Attribute/ProductAttributeValueValueBuilder.php index 64c50d01..0545e1d5 100644 --- a/src/Builder/Attribute/ProductAttributeValueValueBuilder.php +++ b/src/Builder/Attribute/ProductAttributeValueValueBuilder.php @@ -13,7 +13,7 @@ final class ProductAttributeValueValueBuilder public function __construct( private LoggerInterface $akeneoLogger, /** @var iterable $attributeValueBuilders */ - #[AutowireIterator(ProductAttributeValueValueBuilderInterface::TAG_ID)] + #[AutowireIterator(ProductAttributeValueValueBuilderInterface::class)] private iterable $attributeValueBuilders, ) { } diff --git a/src/Builder/Attribute/ProductAttributeValueValueBuilderInterface.php b/src/Builder/Attribute/ProductAttributeValueValueBuilderInterface.php index 3888c0da..e84bff69 100644 --- a/src/Builder/Attribute/ProductAttributeValueValueBuilderInterface.php +++ b/src/Builder/Attribute/ProductAttributeValueValueBuilderInterface.php @@ -6,11 +6,9 @@ use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface ProductAttributeValueValueBuilderInterface { - public const TAG_ID = 'sylius.akeneo.attribute_value_value_builder'; - public function support(string $attributeCode): bool; /** diff --git a/src/Builder/ProductOptionValue/DynamicOptionValueBuilderInterface.php b/src/Builder/ProductOptionValue/DynamicOptionValueBuilderInterface.php index 92f11867..f45e587c 100644 --- a/src/Builder/ProductOptionValue/DynamicOptionValueBuilderInterface.php +++ b/src/Builder/ProductOptionValue/DynamicOptionValueBuilderInterface.php @@ -8,11 +8,9 @@ use Sylius\Component\Product\Model\ProductOptionValueInterface; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface DynamicOptionValueBuilderInterface { - public const TAG_ID = 'sylius.akeneo.dynamic_option_value_builder'; - public static function getDefaultPriority(): int; public function support(ProductOptionInterface $productOption, mixed $values, array $context = []): bool; diff --git a/src/Builder/ProductOptionValue/ProductOptionValueBuilder.php b/src/Builder/ProductOptionValue/ProductOptionValueBuilder.php index 3fad6f8b..d8acefb1 100644 --- a/src/Builder/ProductOptionValue/ProductOptionValueBuilder.php +++ b/src/Builder/ProductOptionValue/ProductOptionValueBuilder.php @@ -13,7 +13,7 @@ class ProductOptionValueBuilder implements ProductOptionValueBuilderInterface { public function __construct( /** @var iterable $dynamicProductOptionValueBuilders */ - #[AutowireIterator(DynamicOptionValueBuilderInterface::TAG_ID)] + #[AutowireIterator(DynamicOptionValueBuilderInterface::class)] private iterable $dynamicProductOptionValueBuilders, ) { } diff --git a/src/Builder/ProductOptionValueTranslation/ProductOptionValueTranslationBuilder.php b/src/Builder/ProductOptionValueTranslation/ProductOptionValueTranslationBuilder.php index 5691c253..e2e3ab2e 100644 --- a/src/Builder/ProductOptionValueTranslation/ProductOptionValueTranslationBuilder.php +++ b/src/Builder/ProductOptionValueTranslation/ProductOptionValueTranslationBuilder.php @@ -14,7 +14,7 @@ class ProductOptionValueTranslationBuilder implements ProductOptionValueTranslat { public function __construct( /** @var iterable $productOptionValueTranslationBuilders */ - #[AutowireIterator(ProductOptionValueTranslationBuilderInterface::TAG_ID)] + #[AutowireIterator(ProductOptionValueTranslationBuilderInterface::class)] private iterable $productOptionValueTranslationBuilders, ) { } diff --git a/src/Builder/ProductOptionValueTranslation/ProductOptionValueTranslationBuilderInterface.php b/src/Builder/ProductOptionValueTranslation/ProductOptionValueTranslationBuilderInterface.php index 1d05621a..5ed32b45 100644 --- a/src/Builder/ProductOptionValueTranslation/ProductOptionValueTranslationBuilderInterface.php +++ b/src/Builder/ProductOptionValueTranslation/ProductOptionValueTranslationBuilderInterface.php @@ -9,11 +9,9 @@ use Sylius\Component\Product\Model\ProductOptionValueTranslationInterface; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface ProductOptionValueTranslationBuilderInterface { - public const TAG_ID = 'sylius.akeneo.dynamic_option_value_translation_builder'; - public static function getDefaultPriority(): int; public function support( diff --git a/src/Builder/TaxonAttribute/TaxonAttributeValueBuilder.php b/src/Builder/TaxonAttribute/TaxonAttributeValueBuilder.php index 6621a0c6..d9215d4c 100644 --- a/src/Builder/TaxonAttribute/TaxonAttributeValueBuilder.php +++ b/src/Builder/TaxonAttribute/TaxonAttributeValueBuilder.php @@ -11,7 +11,7 @@ final class TaxonAttributeValueBuilder { public function __construct( - #[AutowireIterator(TaxonAttributeValueBuilderInterface::TAG_ID)] + #[AutowireIterator(TaxonAttributeValueBuilderInterface::class)] private iterable $attributeValueBuilders, private LoggerInterface $akeneoLogger, ) { diff --git a/src/Builder/TaxonAttribute/TaxonAttributeValueBuilderInterface.php b/src/Builder/TaxonAttribute/TaxonAttributeValueBuilderInterface.php index 5851bba3..20dad771 100644 --- a/src/Builder/TaxonAttribute/TaxonAttributeValueBuilderInterface.php +++ b/src/Builder/TaxonAttribute/TaxonAttributeValueBuilderInterface.php @@ -6,11 +6,9 @@ use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface TaxonAttributeValueBuilderInterface { - public const TAG_ID = 'sylius.akeneo.taxon.attribute_value_builder'; - public function support(string $attributeCode, string $type): bool; /** diff --git a/src/Processor/Category/CategoryProcessorChain.php b/src/Processor/Category/CategoryProcessorChain.php index b5efa0f2..6708090a 100644 --- a/src/Processor/Category/CategoryProcessorChain.php +++ b/src/Processor/Category/CategoryProcessorChain.php @@ -12,7 +12,7 @@ final class CategoryProcessorChain implements CategoryProcessorChainInterface { public function __construct( /** @var iterable $categoryProcessors */ - #[AutowireIterator(CategoryProcessorInterface::TAG_ID)] + #[AutowireIterator(CategoryProcessorInterface::class)] private iterable $categoryProcessors, private LoggerInterface $akeneoLogger, ) { diff --git a/src/Processor/Category/CategoryProcessorInterface.php b/src/Processor/Category/CategoryProcessorInterface.php index a561fe10..61aeba28 100644 --- a/src/Processor/Category/CategoryProcessorInterface.php +++ b/src/Processor/Category/CategoryProcessorInterface.php @@ -7,11 +7,9 @@ use Sylius\Component\Core\Model\TaxonInterface; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface CategoryProcessorInterface { - public const TAG_ID = 'sylius.akeneo.category_processor'; - public function process(TaxonInterface $taxon, array $resource): void; public function support(TaxonInterface $taxon, array $resource): bool; diff --git a/src/Processor/Product/ProductProcessorChain.php b/src/Processor/Product/ProductProcessorChain.php index 03af3a9a..7ccfec7a 100644 --- a/src/Processor/Product/ProductProcessorChain.php +++ b/src/Processor/Product/ProductProcessorChain.php @@ -12,7 +12,7 @@ final class ProductProcessorChain implements ProductProcessorChainInterface { public function __construct( /** @var iterable $productProcessors */ - #[AutowireIterator(ProductProcessorInterface::TAG_ID)] + #[AutowireIterator(ProductProcessorInterface::class)] private iterable $productProcessors, private LoggerInterface $akeneoLogger, ) { diff --git a/src/Processor/Product/ProductProcessorInterface.php b/src/Processor/Product/ProductProcessorInterface.php index 9af47cb6..fb222938 100644 --- a/src/Processor/Product/ProductProcessorInterface.php +++ b/src/Processor/Product/ProductProcessorInterface.php @@ -7,11 +7,9 @@ use Sylius\Component\Core\Model\ProductInterface; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface ProductProcessorInterface { - public const TAG_ID = 'sylius.akeneo.product_processor'; - public function process(ProductInterface $product, array $resource): void; public function support(ProductInterface $product, array $resource): bool; diff --git a/src/Processor/ProductAttribute/AkeneoAttributeProcessorInterface.php b/src/Processor/ProductAttribute/AkeneoAttributeProcessorInterface.php index ade87d1f..7bd89ec5 100644 --- a/src/Processor/ProductAttribute/AkeneoAttributeProcessorInterface.php +++ b/src/Processor/ProductAttribute/AkeneoAttributeProcessorInterface.php @@ -6,11 +6,9 @@ use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface AkeneoAttributeProcessorInterface { - public const TAG_ID = 'sylius.akeneo.attribute_processor'; - public static function getDefaultPriority(): int; public function support(string $attributeCode, array $context = []): bool; diff --git a/src/Processor/ProductAttributeValue/ReferenceEntity/ReferenceEntityAttributeValueProcessorInterface.php b/src/Processor/ProductAttributeValue/ReferenceEntity/ReferenceEntityAttributeValueProcessorInterface.php index 00041a41..d24c0a10 100644 --- a/src/Processor/ProductAttributeValue/ReferenceEntity/ReferenceEntityAttributeValueProcessorInterface.php +++ b/src/Processor/ProductAttributeValue/ReferenceEntity/ReferenceEntityAttributeValueProcessorInterface.php @@ -6,11 +6,9 @@ use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface ReferenceEntityAttributeValueProcessorInterface { - public const TAG_ID = 'sylius.akeneo.reference_entity_attribute_value_processor'; - public static function getDefaultPriority(): int; /** diff --git a/src/Processor/ProductAttributeValue/Table/TableProductAttributeValueProcessorInterface.php b/src/Processor/ProductAttributeValue/Table/TableProductAttributeValueProcessorInterface.php index 443f0eb8..2a38bb63 100644 --- a/src/Processor/ProductAttributeValue/Table/TableProductAttributeValueProcessorInterface.php +++ b/src/Processor/ProductAttributeValue/Table/TableProductAttributeValueProcessorInterface.php @@ -7,11 +7,9 @@ use Sylius\Component\Product\Model\ProductAttributeInterface; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface TableProductAttributeValueProcessorInterface { - public const TAG_ID = 'sylius.akeneo.table_product_attribute_value_processor'; - public static function getDefaultPriority(): int; /** diff --git a/src/Processor/ProductOptionValue/OptionValuesProcessorInterface.php b/src/Processor/ProductOptionValue/OptionValuesProcessorInterface.php index ef414027..c86f60d3 100644 --- a/src/Processor/ProductOptionValue/OptionValuesProcessorInterface.php +++ b/src/Processor/ProductOptionValue/OptionValuesProcessorInterface.php @@ -8,11 +8,9 @@ use Sylius\Component\Product\Model\ProductOptionInterface; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface OptionValuesProcessorInterface { - public const TAG_ID = 'sylius.akeneo.option_values_processor'; - public static function getDefaultPriority(): int; public function support( diff --git a/src/Processor/ProductVariant/ProductVariantProcessorChain.php b/src/Processor/ProductVariant/ProductVariantProcessorChain.php index 628091cc..b797ccdc 100644 --- a/src/Processor/ProductVariant/ProductVariantProcessorChain.php +++ b/src/Processor/ProductVariant/ProductVariantProcessorChain.php @@ -12,7 +12,7 @@ final class ProductVariantProcessorChain implements ProductVariantProcessorChain { public function __construct( /** @var iterable $productVariantProcessors */ - #[AutowireIterator(ProductVariantProcessorInterface::TAG_ID)] + #[AutowireIterator(ProductVariantProcessorInterface::class)] private iterable $productVariantProcessors, private LoggerInterface $akeneoLogger, ) { diff --git a/src/Processor/ProductVariant/ProductVariantProcessorInterface.php b/src/Processor/ProductVariant/ProductVariantProcessorInterface.php index 37e47896..30e2591d 100644 --- a/src/Processor/ProductVariant/ProductVariantProcessorInterface.php +++ b/src/Processor/ProductVariant/ProductVariantProcessorInterface.php @@ -7,11 +7,9 @@ use Sylius\Component\Core\Model\ProductVariantInterface; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface ProductVariantProcessorInterface { - public const TAG_ID = 'sylius.akeneo.product_variant_processor'; - public function process(ProductVariantInterface $productVariant, array $resource): void; public function support(ProductVariantInterface $productVariant, array $resource): bool; diff --git a/src/Provider/AkeneoAttributeProcessorProvider.php b/src/Provider/AkeneoAttributeProcessorProvider.php index 2f136c65..b3809a63 100644 --- a/src/Provider/AkeneoAttributeProcessorProvider.php +++ b/src/Provider/AkeneoAttributeProcessorProvider.php @@ -12,7 +12,7 @@ final class AkeneoAttributeProcessorProvider implements AkeneoAttributeProcessor { public function __construct( /** @var iterable $akeneoAttributeProcessors */ - #[AutowireIterator(AkeneoAttributeProcessorInterface::TAG_ID)] + #[AutowireIterator(AkeneoAttributeProcessorInterface::class)] private iterable $akeneoAttributeProcessors, ) { } diff --git a/src/Provider/Asset/AssetAttributeTypeMatcherProvider.php b/src/Provider/Asset/AssetAttributeTypeMatcherProvider.php index b56a28aa..1cb4aaee 100644 --- a/src/Provider/Asset/AssetAttributeTypeMatcherProvider.php +++ b/src/Provider/Asset/AssetAttributeTypeMatcherProvider.php @@ -13,7 +13,7 @@ final class AssetAttributeTypeMatcherProvider implements AssetAttributeTypeMatch { public function __construct( /** @var iterable $typeMatchers */ - #[AutowireIterator(AssetAttributeTypeMatcherInterface::TAG_ID)] + #[AutowireIterator(AssetAttributeTypeMatcherInterface::class)] private iterable $typeMatchers, private LoggerInterface $akeneoLogger, ) { diff --git a/src/Provider/Asset/AssetValueBuilderProvider.php b/src/Provider/Asset/AssetValueBuilderProvider.php index 85308e2b..c5ce57f4 100644 --- a/src/Provider/Asset/AssetValueBuilderProvider.php +++ b/src/Provider/Asset/AssetValueBuilderProvider.php @@ -14,7 +14,7 @@ final class AssetValueBuilderProvider implements AssetValueBuilderProviderInterf { public function __construct( /** @var iterable $assetAttributeValueBuilders */ - #[AutowireIterator(AssetAttributeValueBuilderInterface::TAG_ID)] + #[AutowireIterator(AssetAttributeValueBuilderInterface::class)] private iterable $assetAttributeValueBuilders, private LoggerInterface $akeneoLogger, private EditionCheckerInterface $editionChecker, diff --git a/src/Provider/ChainOptionValuesProcessorProvider.php b/src/Provider/ChainOptionValuesProcessorProvider.php index 4337916f..d7b79b47 100644 --- a/src/Provider/ChainOptionValuesProcessorProvider.php +++ b/src/Provider/ChainOptionValuesProcessorProvider.php @@ -14,7 +14,7 @@ final class ChainOptionValuesProcessorProvider implements OptionValuesProcessorP { public function __construct( /** @var iterable $optionValuesProcessors */ - #[AutowireIterator(OptionValuesProcessorInterface::TAG_ID)] + #[AutowireIterator(OptionValuesProcessorInterface::class)] private iterable $optionValuesProcessors, ) { } diff --git a/src/Provider/ProductAttributeValue/TableAttributeValueProcessorProvider.php b/src/Provider/ProductAttributeValue/TableAttributeValueProcessorProvider.php index 6571fdc2..ed3360e4 100644 --- a/src/Provider/ProductAttributeValue/TableAttributeValueProcessorProvider.php +++ b/src/Provider/ProductAttributeValue/TableAttributeValueProcessorProvider.php @@ -12,7 +12,7 @@ class TableAttributeValueProcessorProvider implements TableAttributeValueProcessorProviderInterface { public function __construct( - #[AutowireIterator(TableProductAttributeValueProcessorInterface::TAG_ID)] + #[AutowireIterator(TableProductAttributeValueProcessorInterface::class)] private iterable $tableAttributeValueProcessors, ) { } diff --git a/src/Provider/ProductRefEntityAttributeValueValueBuilderProvider.php b/src/Provider/ProductRefEntityAttributeValueValueBuilderProvider.php index af9eb70b..d432ea66 100644 --- a/src/Provider/ProductRefEntityAttributeValueValueBuilderProvider.php +++ b/src/Provider/ProductRefEntityAttributeValueValueBuilderProvider.php @@ -12,7 +12,7 @@ final class ProductRefEntityAttributeValueValueBuilderProvider implements Produc { public function __construct( /** @var iterable $referenceEntityAttributeValueProcessors */ - #[AutowireIterator(ReferenceEntityAttributeValueProcessorInterface::TAG_ID)] + #[AutowireIterator(ReferenceEntityAttributeValueProcessorInterface::class)] private iterable $referenceEntityAttributeValueProcessors, ) { } diff --git a/src/Transformer/DataMigration/DataMigrationTransformer.php b/src/Transformer/DataMigration/DataMigrationTransformer.php index cad076a2..6ca1c0e2 100644 --- a/src/Transformer/DataMigration/DataMigrationTransformer.php +++ b/src/Transformer/DataMigration/DataMigrationTransformer.php @@ -12,7 +12,7 @@ final class DataMigrationTransformer { public function __construct( /** @var iterable $dataMigrationTransformers */ - #[AutowireIterator(DataMigrationTransformerInterface::TAG_ID)] + #[AutowireIterator(DataMigrationTransformerInterface::class)] private iterable $dataMigrationTransformers, ) { } diff --git a/src/Transformer/DataMigration/DataMigrationTransformerInterface.php b/src/Transformer/DataMigration/DataMigrationTransformerInterface.php index 5e9b776a..dfccb55d 100644 --- a/src/Transformer/DataMigration/DataMigrationTransformerInterface.php +++ b/src/Transformer/DataMigration/DataMigrationTransformerInterface.php @@ -6,11 +6,9 @@ use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface DataMigrationTransformerInterface { - public const TAG_ID = 'sylius.akeneo.data_migration_transformer'; - public function support(string $fromType, string $toType): bool; public function transform(mixed $value): array; diff --git a/src/TypeMatcher/Asset/Attribute/AssetAttributeTypeMatcherInterface.php b/src/TypeMatcher/Asset/Attribute/AssetAttributeTypeMatcherInterface.php index fefb90ef..51635597 100644 --- a/src/TypeMatcher/Asset/Attribute/AssetAttributeTypeMatcherInterface.php +++ b/src/TypeMatcher/Asset/Attribute/AssetAttributeTypeMatcherInterface.php @@ -7,8 +7,7 @@ use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; use Synolia\SyliusAkeneoPlugin\TypeMatcher\TypeMatcherInterface; -#[AutoconfigureTag(self::TAG_ID)] +#[AutoconfigureTag] interface AssetAttributeTypeMatcherInterface extends TypeMatcherInterface { - public const TAG_ID = 'sylius.akeneo.asset_attribute_type_matcher'; } diff --git a/src/TypeMatcher/Attribute/AttributeTypeMatcher.php b/src/TypeMatcher/Attribute/AttributeTypeMatcher.php index b0b31c9d..32d16a50 100644 --- a/src/TypeMatcher/Attribute/AttributeTypeMatcher.php +++ b/src/TypeMatcher/Attribute/AttributeTypeMatcher.php @@ -13,7 +13,7 @@ final class AttributeTypeMatcher { public function __construct( /** @var iterable $typeMatchers */ - #[AutowireIterator(AttributeTypeMatcherInterface::TAG_ID)] + #[AutowireIterator(AttributeTypeMatcherInterface::class)] private iterable $typeMatchers, private LoggerInterface $akeneoLogger, ) { diff --git a/src/TypeMatcher/Attribute/AttributeTypeMatcherInterface.php b/src/TypeMatcher/Attribute/AttributeTypeMatcherInterface.php index 37f78d94..1d8f45bd 100644 --- a/src/TypeMatcher/Attribute/AttributeTypeMatcherInterface.php +++ b/src/TypeMatcher/Attribute/AttributeTypeMatcherInterface.php @@ -7,8 +7,7 @@ use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; use Synolia\SyliusAkeneoPlugin\TypeMatcher\TypeMatcherInterface; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface AttributeTypeMatcherInterface extends TypeMatcherInterface { - public const TAG_ID = 'sylius.akeneo.type_matcher'; } diff --git a/src/TypeMatcher/ReferenceEntityAttribute/ReferenceEntityAttributeTypeMatcher.php b/src/TypeMatcher/ReferenceEntityAttribute/ReferenceEntityAttributeTypeMatcher.php index 81e1afc4..10ce0cb2 100644 --- a/src/TypeMatcher/ReferenceEntityAttribute/ReferenceEntityAttributeTypeMatcher.php +++ b/src/TypeMatcher/ReferenceEntityAttribute/ReferenceEntityAttributeTypeMatcher.php @@ -11,7 +11,7 @@ final class ReferenceEntityAttributeTypeMatcher { public function __construct( /** @var iterable $typeMatchers */ - #[AutowireIterator(ReferenceEntityAttributeTypeMatcherInterface::TAG_ID)] + #[AutowireIterator(ReferenceEntityAttributeTypeMatcherInterface::class)] private iterable $typeMatchers, ) { } diff --git a/src/TypeMatcher/ReferenceEntityAttribute/ReferenceEntityAttributeTypeMatcherInterface.php b/src/TypeMatcher/ReferenceEntityAttribute/ReferenceEntityAttributeTypeMatcherInterface.php index 45eac6c4..6fde97f0 100644 --- a/src/TypeMatcher/ReferenceEntityAttribute/ReferenceEntityAttributeTypeMatcherInterface.php +++ b/src/TypeMatcher/ReferenceEntityAttribute/ReferenceEntityAttributeTypeMatcherInterface.php @@ -10,7 +10,5 @@ #[AutoconfigureTag] interface ReferenceEntityAttributeTypeMatcherInterface extends TypeMatcherInterface { - public const TAG_ID = 'sylius.akeneo.reference_entity_attribute_type_matcher'; - public function getStorageType(): string; } diff --git a/src/TypeMatcher/TaxonAttribute/TaxonAttributeTypeMatcher.php b/src/TypeMatcher/TaxonAttribute/TaxonAttributeTypeMatcher.php index 81a9a780..1af52e83 100644 --- a/src/TypeMatcher/TaxonAttribute/TaxonAttributeTypeMatcher.php +++ b/src/TypeMatcher/TaxonAttribute/TaxonAttributeTypeMatcher.php @@ -13,7 +13,7 @@ final class TaxonAttributeTypeMatcher { public function __construct( /** @var iterable $typeMatchers */ - #[AutowireIterator(TaxonAttributeTypeMatcherInterface::TAG_ID)] + #[AutowireIterator(TaxonAttributeTypeMatcherInterface::class)] private iterable $typeMatchers, private LoggerInterface $akeneoLogger, ) { diff --git a/src/TypeMatcher/TaxonAttribute/TaxonAttributeTypeMatcherInterface.php b/src/TypeMatcher/TaxonAttribute/TaxonAttributeTypeMatcherInterface.php index 92b65f5d..a2120cfc 100644 --- a/src/TypeMatcher/TaxonAttribute/TaxonAttributeTypeMatcherInterface.php +++ b/src/TypeMatcher/TaxonAttribute/TaxonAttributeTypeMatcherInterface.php @@ -8,10 +8,8 @@ use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; use Synolia\SyliusAkeneoPlugin\TypeMatcher\TypeMatcherInterface; -#[AutoconfigureTag(name: self::TAG_ID)] +#[AutoconfigureTag] interface TaxonAttributeTypeMatcherInterface extends TypeMatcherInterface { - public const TAG_ID = 'sylius.akeneo.type_matcher.taxon.attribute'; - public function getAttributeType(): AttributeTypeInterface; }