Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Incorrect deprecation: Since api-platform/core 2.7: Decorating the legacy ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface is deprecated, use ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface instead. #5078

@bendavies

Description

@bendavies

API Platform version(s) affected: 2.7.2

Description
Receive the deprecation

Since api-platform/core 2.7: Decorating the legacy ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface is deprecated, use ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface instead.

from

if (null === ($options['deprecate'] ?? null)) {

First of all, I am not Decorating the legacy ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface, api-platform is decorating it.

It seems that deprecate => false in options should cascade down from ApiPlatform\Metadata\Property\Factory\LegacyPropertyMetadataFactory, but LegacyPropertyMetadataFactory is not in my chain of metadata factories, as this service is not loaded when metadata_backward_compatibility_layer is enabled.

This is reported by symfony phpunit bridge as a self deprecation handler, i.e. i should be able to resolve it in my own.
This is not true.

How to reproduce
Use on a project using the legacy metadata system

Possible Solution
Unknown

Additional Context
introduced in #4685

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions