-
-
Notifications
You must be signed in to change notification settings - Fork 901
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
fix(metadata): operations must inherit from resource and defaults #5194
Conversation
vincentchalamon
commented
Nov 16, 2022
Q | A |
---|---|
Branch? | 2.7 |
Tickets | #5179 |
License | MIT |
Doc PR | N/A |
src/Metadata/Resource/Factory/ExtractorResourceMetadataCollectionFactory.php
Show resolved
Hide resolved
8121b60
to
736e2cc
Compare
736e2cc
to
2b2d468
Compare
@@ -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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.