Problem/Motivation
The TypedData::setValue() method invokes the onChange() method on the parent typed data object.
While the parent is of type TraversableTypedDataInterface, that method is not part of the interface.
This can be fixed now because we've got a proper interface for the parent typed data which is TraversableTypedDataInterface.
See #2346129: Introduce a TraversableTypedDataInterface and use that for typehinting instead of ArrayElement
Note this is not an issue introduced by that new interface as it was existing before of that. It is an issue that can be fixed now because we've got that new interface.
Proposed resolution
Move that method one level up in the interface hierarchy, to TraversableTypedDataInterface
User interface changes
None
API changes
None. Method is just moved to parent interface.
Comment | File | Size | Author |
---|---|---|---|
#1 | 9449-typed-data-onchange-01.patch | 2.13 KB | Jose Reyero |
Comments
Comment #1
Jose Reyero CreditAttribution: Jose Reyero commentedSimple patch that fixes the issue and also saves a few lines of code.
Comment #2
Jose Reyero CreditAttribution: Jose Reyero commentedRun tests
Comment #3
Gábor HojtsyThis makes total sense.
Comment #4
alexpottCommitted 388758f and pushed to 8.0.x. Thanks!
Comment #6
Gábor HojtsySuperb, thanks.