Skip to content

fix(metadata): operations must inherit from resource and defaults #5194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 17, 2022

Conversation

vincentchalamon
Copy link
Contributor

Q A
Branch? 2.7
Tickets #5179
License MIT
Doc PR N/A

@vincentchalamon vincentchalamon self-assigned this Nov 16, 2022
@vincentchalamon vincentchalamon linked an issue Nov 16, 2022 that may be closed by this pull request
@vincentchalamon vincentchalamon force-pushed the fix/issues/5179 branch 5 times, most recently from 8121b60 to 736e2cc Compare November 17, 2022 08:28
@vincentchalamon vincentchalamon marked this pull request as ready for review November 17, 2022 08:34
@@ -26,6 +26,9 @@
use ApiPlatform\Metadata\Put;
use ApiPlatform\Metadata\Resource\DeprecationMetadataTrait;
use ApiPlatform\Metadata\Resource\ResourceMetadataCollection;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we find a way to remove this dependency? Or at least create an interface to abstract it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be done in a separate PR as it's used at least 7 times in traits and classes. It's hardcoded (new CamelCaseToSnakeCaseNameConverter()), using an interface would require a dependency injection behavior.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's a point doing an abstraction for this.

@vincentchalamon vincentchalamon merged commit abed742 into api-platform:2.7 Nov 17, 2022
@vincentchalamon vincentchalamon deleted the fix/issues/5179 branch November 17, 2022 09:49
soyuka added a commit to soyuka/core that referenced this pull request Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.7.3 ignores the route_prefix prefix settings
3 participants