Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
- Why is this doing something very special with
\Drupal\jsonapi\Normalizer\Value\ValueExtractorInterface
? (Which has zero documentation, and no associated d.o issue, so the discussion leading to this design decision is impossible to find.) It's also not tested. - Why is this doing something special with
$context['data_wrapper']
? It is not documented nor tested. - Why does this not implement
\Symfony\Component\Serializer\Encoder\EncoderInterface
+\Symfony\Component\Serializer\Encoder\DecoderInterface
? - Why does this not extend
\Drupal\serialization\Encoder\JsonEncoder
?
Comment | File | Size | Author |
---|---|---|---|
#2 | 2829407--encoder-clarifications--2.patch | 1001 bytes | e0ipso |
|
Comments
Comment #2
e0ipsoDrupal\Tests\jsonapi\Kernel\Normalizer\DocumentRootNormalizerTest::testNormalizeException
Drupal\Tests\jsonapi\Functional\JsonApiFunctionalTest::testWrite
andDrupal\Tests\jsonapi\Kernel\Normalizer\DocumentRootNormalizerTest::testNormalizeException
Symfony\Component\Serializer\Encoder\JsonEncoder
. Do you want me to surface that as well in the current class?json
andajax
. Therefore, imo, it shouldn't extend that class only to override all of its responsibilities.@Wim Leers let me know if there are any action items for this one besides the current code doc patch.
Comment #3
e0ipsoComment #4
Wim LeersComment #6
e0ipsoUgh! I forgot to merge this one. Sorry for the delay.
Comment #8
Wim LeersThis did not address point 4 in the IS. Created #2840967: \Drupal\jsonapi\Encoder\JsonEncoder should extend the serialization module's JsonEncoder, not Symfony's for that.