Skip to content

Commit e8e3f29

Browse files
committed
temp temp temp
1 parent d2e542d commit e8e3f29

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Core/Metadata/Property/Factory/InheritedPropertyMetadataFactory.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace ApiPlatform\Core\Metadata\Property\Factory;
1515

16-
use ApiPlatform\Metadata\ApiProperty;
16+
use ApiPlatform\Core\Metadata\Property\PropertyMetadata;
1717
use ApiPlatform\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface;
1818

1919
/**
@@ -35,11 +35,11 @@ public function __construct(ResourceNameCollectionFactoryInterface $resourceName
3535
/**
3636
* {@inheritdoc}
3737
*/
38-
public function create(string $resourceClass, string $property, array $options = [])
38+
public function create(string $resourceClass, string $property, array $options = []): PropertyMetadata
3939
{
4040
@trigger_error(sprintf('"%s" is deprecated since 2.6 and will be removed in 3.0.', __CLASS__), \E_USER_DEPRECATED);
4141

42-
$propertyMetadata = $this->decorated ? $this->decorated->create($resourceClass, $property, $options) : new ApiProperty();
42+
$propertyMetadata = $this->decorated ? $this->decorated->create($resourceClass, $property, $options) : new PropertyMetadata();
4343

4444
foreach ($this->resourceNameCollectionFactory->create() as $knownResourceClass) {
4545
if ($resourceClass === $knownResourceClass) {

src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -874,9 +874,10 @@ private function registerLegacyServices(ContainerBuilder $container, array $conf
874874
];
875875

876876
foreach ($remapDefinitionClasses as $id => $class) {
877-
$container->getDefinition($id)->setClass($class);
877+
$container->getDefinition($id)->setClass($class)->setDecoratedService('api_platform.metadata.property.metadata_factory.legacy');
878878
}
879879

880+
$container->removeAlias('api_platform.property.metadata_factory');
880881
$container->setAlias('api_platform.metadata.property.metadata_factory', 'api_platform.metadata.property.metadata_factory.legacy');
881882
}
882883

0 commit comments

Comments
 (0)