Problem/Motivation
The Typed Data API has a getCastedValue()
method for its primitives because PHP < 7 didn't have strict typing capabilities for scalars.
We should be able to deprecate it and add (nullable) scalar return types to getValue()
directly.
Proposed resolution
Starting with Drupal 9 we should be able to use (at least) PHP 7.1 which has nullable scalar types, so let's give it a try :)
Remaining tasks
TBD.
User interface changes
Nope.
API changes
TBD.
Data model changes
Nope.
Release notes snippet
TBD.