core icon indicating copy to clipboard operation
core copied to clipboard

chore: warn about mis-configured resources in debug:api-resource command

Open azjezz opened this issue 3 years ago • 4 comments

Signed-off-by: azjezz [email protected]

Q A
Branch? main
Tickets N/A
License MIT
Doc PR N/A

azjezz avatar Sep 13 '22 10:09 azjezz

I don't get it, the resource metadata factory is already calling the extractor ?

soyuka avatar Sep 13 '22 16:09 soyuka

depends on which resource metadata factory is used, attribute resource metadata factory doesn't call the extractor, and will create the resource even if it's not configured ( related to the internal discussion )

azjezz avatar Sep 13 '22 18:09 azjezz

We use decoration on our api_platform.metadata.resource.metadata_collection_factory service and it should definitely call https://github.com/api-platform/core/blob/main/src/Metadata/Resource/Factory/ExtractorResourceMetadataCollectionFactory.php at some point.

soyuka avatar Sep 14 '22 08:09 soyuka

We use decoration on our api_platform.metadata.resource.metadata_collection_factory service and it should definitely call https://github.com/api-platform/core/blob/main/src/Metadata/Resource/Factory/ExtractorResourceMetadataCollectionFactory.php at some point.

Yes, but the attribute resource metadata collection factory result won't be empty, hence why the command doesn't fail, or emit a warning.

azjezz avatar Sep 14 '22 14:09 azjezz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 14 '22 01:11 stale[bot]