fix(JsonLd): Ignore context resource_class when it is populated with an interface or an abstract class.
| Q | A |
|---|---|
| Branch? | main |
| Tickets | Closes #6251 |
| License | MIT |
I put null !== $previousResourceClass && $isResourceClass condition before testing if it's an abstract or interface in order to avoid using \ReflectionClass for every Item normalization. Just for this specific case for performances sake.
I can't figure out how to create a Test Case for this. I don't need a complete ApiTestCase, just creating some objects and a working and configured JsonLd serializer.
Look at the ItemNormalizerTest? A functional test would be awesome imo, for this either add a functional test like https://github.com/api-platform/core/blob/main/tests/Functional/Parameters/ParameterTests.php or a behat test.
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.
can you send me the resource and a use case (even curl) so that I add a test?