- Issue created by @mattlc
- πΊπΈUnited States apmsoonerIs there another alternative? I don't really want to put a dependency on serialization just to make this work with a contrib module that does not seem to even have that much usage. This seems like something that should be accounted for in the web profiler module IMO. Why would it even be conflicting with normalizers that have nothing to do with it? 
- π«π·France mattlcActually, the dependency already exists for jsonapi integration in custom_field's code (in all the Normalizer classes). Normalizers are used when jsonapi module is enabled. jsonapi requires serialization module so this is why the bug is quite "silent". If you don't want this dependency to be in added to custom_field, one solution could be to move the jsonapi integration (EntityReferenceNormalizer, StringLongNormalizer, UriNormalizer and associated services definitions) to a submodule that depends on serialization core module. 
- π«π·France mattlcJust updated the fix to extract dependency in a submodule. 
 Also taken care of auto-enable the submodule to keep consistency when jsonapi module is enabled.
- πΊπΈUnited States apmsoonerThis makes better sense I think. Just remove the serialization dependency from custom_field.info and change the dependency on custom_field_jsonapi.info to drupal/jsonapi since it already has the dependency for serialization. Technically the keys in custom_field_jsonapi.services.yml should be changed to match the sub-module also. e.g. custom_field_jsonapi.normalizer.string_long 
- π«π·France mattlcImplemented asked modifications. 
 Tested on Drupal 11 locally.
 Should be tested on both Drupal 11 and Drupal 10.3+ especially with jsonapi enabled prior to update (to test auto-enable of submodule).
- πΊπΈUnited States apmsoonerAwesome, thank you! I'll review and merge as soon as I get a chance and should plan to get into next release. 
- πΊπΈUnited States apmsoonerThis checks out fine on Drupal 10 for me. Nice work @mattic 
- 
            
              apmsooner β
             committed 5e31a48c on 3.1.x authored by 
            
              mattlc β
            
Issue #3528633 by mattlc, apmsooner: Move jsonapi normalizers into sub-... 
 
- 
            
              apmsooner β
             committed 5e31a48c on 3.1.x authored by 
            
              mattlc β