Skip to content

Commit

Permalink
fix(metadata): remove identifier_metadata_factory services (#5518)
Browse files Browse the repository at this point in the history
fixes #5506
  • Loading branch information
soyuka authored Apr 4, 2023
1 parent 6d7aaf7 commit 6d2f883
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 52 deletions.
9 changes: 0 additions & 9 deletions src/Symfony/Bundle/Resources/config/doctrine_mongodb_odm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,6 @@
<argument type="service" id="doctrine_mongodb" />
<argument type="service" id="api_platform.doctrine.odm.metadata.resource.metadata_collection_factory.inner" />
</service>

<service id="api_platform.doctrine_mongodb.odm.metadata.property.identifier_metadata_factory"
class="ApiPlatform\Doctrine\Odm\Metadata\Property\DoctrineMongoDbOdmPropertyMetadataFactory"
decorates="api_platform.metadata.property.identifier_metadata_factory"
decoration-priority="40">
<argument type="service" id="doctrine_mongodb"/>
<argument type="service" id="api_platform.doctrine_mongodb.odm.metadata.property.identifier_metadata_factory.inner"/>
</service>

</services>

</container>
5 changes: 0 additions & 5 deletions src/Symfony/Bundle/Resources/config/doctrine_orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,6 @@
<argument type="service" id="api_platform.doctrine.orm.metadata.property.metadata_factory.inner" />
</service>

<service id="api_platform.doctrine.orm.metadata.property.identifier_metadata_factory" class="ApiPlatform\Doctrine\Orm\Metadata\Property\DoctrineOrmPropertyMetadataFactory" decorates="api_platform.metadata.property.identifier_metadata_factory" decoration-priority="40">
<argument type="service" id="doctrine" />
<argument type="service" id="api_platform.doctrine.orm.metadata.property.identifier_metadata_factory.inner" />
</service>

<service id="api_platform.doctrine.orm.state.collection_provider" class="ApiPlatform\Doctrine\Orm\State\CollectionProvider" public="false">
<argument type="service" id="api_platform.metadata.resource.metadata_collection_factory" />
<argument type="service" id="doctrine" />
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/Resources/config/metadata/links.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<services>
<service id="api_platform.metadata.resource.link_factory" class="ApiPlatform\Metadata\Resource\Factory\LinkFactory" public="false">
<argument type="service" id="api_platform.metadata.property.name_collection_factory" />
<argument type="service" id="api_platform.metadata.property.identifier_metadata_factory" />
<argument type="service" id="api_platform.metadata.property.metadata_factory" />
<argument type="service" id="api_platform.resource_class_resolver" />
</service>
</services>
Expand Down
27 changes: 0 additions & 27 deletions src/Symfony/Bundle/Resources/config/metadata/property.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,6 @@
<argument type="service" id="api_platform.metadata.property_extractor.xml" />
</service>

<!-- Property metadata used to compute identifiers, we want to avoid using the serializer property metadata factory -->
<!-- TODO: in 3.0 the serializer property metadata factory doesn't need the resource metadata anymore so these will be removed -->
<service id="api_platform.metadata.property.identifier_metadata_factory" alias="api_platform.metadata.property.identifier_metadata_factory.property_info" />

<service id="api_platform.metadata.property.identifier_metadata_factory.property_info" class="ApiPlatform\Metadata\Property\Factory\PropertyInfoPropertyMetadataFactory" public="false">
<argument type="service" id="api_platform.property_info" />
</service>

<service id="api_platform.metadata.property.identifier_metadata_factory.attribute" class="ApiPlatform\Metadata\Property\Factory\AttributePropertyMetadataFactory" decorates="api_platform.metadata.property.identifier_metadata_factory" public="false" decoration-priority="20">
<argument type="service" id="api_platform.metadata.property.identifier_metadata_factory.attribute.inner" />
</service>

<service id="api_platform.metadata.property.identifier_metadata_factory.xml" decorates="api_platform.metadata.property.identifier_metadata_factory" class="ApiPlatform\Metadata\Property\Factory\ExtractorPropertyMetadataFactory" public="false" decoration-priority="10">
<argument type="service" id="api_platform.metadata.property_extractor.xml" />
<argument type="service" id="api_platform.metadata.property.identifier_metadata_factory.xml.inner" />
</service>

<service id="api_platform.metadata.property.identifier_metadata_factory.identifier" decorates="api_platform.metadata.property.identifier_metadata_factory" decoration-priority="30" class="ApiPlatform\Metadata\Property\Factory\IdentifierPropertyMetadataFactory" public="false">
<argument type="service" id="api_platform.resource_class_resolver" />
<argument type="service" id="api_platform.metadata.property.identifier_metadata_factory.identifier.inner" />
</service>

<service id="api_platform.metadata.property.identifier_metadata_factory.cached" class="ApiPlatform\Metadata\Property\Factory\CachedPropertyMetadataFactory" decorates="api_platform.metadata.property.identifier_metadata_factory" decoration-priority="-10" public="false">
<argument type="service" id="api_platform.cache.metadata.property" />
<argument type="service" id="api_platform.metadata.property.identifier_metadata_factory.cached.inner" />
</service>

<!-- Cache -->
<service id="api_platform.cache.metadata.property" parent="cache.system" public="false">
<tag name="cache.pool" />
Expand Down
5 changes: 0 additions & 5 deletions src/Symfony/Bundle/Resources/config/metadata/yaml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,5 @@
<argument type="service" id="api_platform.metadata.property_extractor.yaml" />
<argument type="service" id="api_platform.metadata.property.name_collection_factory.yaml.inner" />
</service>

<service id="api_platform.metadata.property.identifier_metadata_factory.yaml" class="ApiPlatform\Metadata\Property\Factory\ExtractorPropertyMetadataFactory" decorates="api_platform.metadata.property.identifier_metadata_factory" decoration-priority="20" public="false">
<argument type="service" id="api_platform.metadata.property_extractor.yaml" />
<argument type="service" id="api_platform.metadata.property.identifier_metadata_factory.yaml.inner" />
</service>
</services>
</container>
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,6 @@ public function testMetadataConfiguration(): void
'api_platform.metadata.property.metadata_factory.cached',
'api_platform.metadata.property.metadata_factory.default_property',
'api_platform.metadata.property.metadata_factory.xml',
'api_platform.metadata.property.identifier_metadata_factory.attribute',
'api_platform.metadata.property.identifier_metadata_factory.xml',
'api_platform.metadata.property.identifier_metadata_factory.yaml',
'api_platform.cache.metadata.property',

// metadata/property_name.xml
Expand Down Expand Up @@ -400,7 +397,6 @@ public function testMetadataConfiguration(): void
PropertyNameCollectionFactoryInterface::class,

// metadata/property.xml
'api_platform.metadata.property.identifier_metadata_factory',
'api_platform.metadata.property.metadata_factory',

// metadata/resource.xml
Expand Down Expand Up @@ -815,7 +811,6 @@ public function testDoctrineMongoDbOdmConfiguration(): void
'api_platform.doctrine_mongodb.odm.aggregation_extension.filter',
'api_platform.doctrine_mongodb.odm.aggregation_extension.pagination',
'api_platform.doctrine_mongodb.odm.aggregation_extension.order',
'api_platform.doctrine_mongodb.odm.metadata.property.identifier_metadata_factory',
];

$aliases = [
Expand Down

0 comments on commit 6d2f883

Please sign in to comment.