Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291070

Enforce unique interfaces for typed data types

$
0
0

As a follow-up to #2002102: Move TypedData primitive types to interfaces and #1867856: Use annotation discovery for data type plugins we should consider relying on interfaces for defining typed data types. For me this is the next logical step as in case of typed data the interface should really be what matters instead of the class. This would also ensure that each typed data type is based on its own, unique interface while the class may still be swapped.

If we can depend on this it is going to make the implementation of the typed data parameter converter (@see #1906810: Add a ParamConverter for upcasting TypedData objects as we could then reliably use reflection to read the desired typed data type of a route parameter from the corresponding controller argument typehint).


Viewing all articles
Browse latest Browse all 291070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>