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.
Problem/Motivation
In serialization.services.yml we have an empty array passed into the constructor for the ChainEntityResolver service. The RegisterEntityResolversCompilerPass then aggregates a list of resolvers and uses replaceArgument to add them to the ChainEntityResolver. This is not really a pattern we use in other places, and I think it is more confusing.
Proposed resolution
Replace this usage with addResolver calls on the serializer.entity_resolver service.
Remaining tasks
Do it
User interface changes
None
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#7 | interdiff-2284413-7.txt | 1.84 KB | damiankloip |
#7 | 2284413-7.patch | 5.98 KB | damiankloip |
#3 | 2284413-3.patch | 4.93 KB | damiankloip |
#1 | 2284413.patch | 5.18 KB | damiankloip |
Comments
Comment #1
damiankloip CreditAttribution: damiankloip commentedComment #2
damiankloip CreditAttribution: damiankloip commented1: 2284413.patch queued for re-testing.
Comment #3
damiankloip CreditAttribution: damiankloip commentedReroll after #697760: Replace getInfo() in tests with native phpDoc + annotations (following PHPUnit).
Comment #4
dawehnerI wonder whether this means that we need a new interface here? I would say no
Comment #5
damiankloip CreditAttribution: damiankloip commentedYeah. I would agree no too I think :)
Comment #6
dawehneragreed
Comment #7
damiankloip CreditAttribution: damiankloip commentedSpoke to Alex, he would like to see an interface as the compiler pass depends on it.
Comment #8
dawehnerI especially think that we should be able to chain more resolvers later
Comment #9
alexpottCommitted a0290ec and pushed to 8.x. Thanks!