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

Follow-up for #2483183: make the Breadcrumb value object use composition instead of inheritance

$
0
0

Problem/Motivation

After #2483183: Make breadcrumb block cacheable got committed, @yched revived a recent Twitter conversation: https://twitter.com/yched/status/631907531120607234

@yched: @da_wehner @wimleers Breadcrumb would have seemed to me a good example of composition being more suitable than inheritance ;-)

To which @dawehner replied:

@da_whener: @yched @wimleers You are absolute right here!

Proposed resolution

Make @yched & @da_wehner happy, and in the process end up with better code.

The beauty is that #2526326: Update CacheableMetadata & AccessResult to use RefinableCacheableDependency(Interface|Trait) just landed, which makes this quite easy to fix.

Remaining tasks

Review.

User interface changes

None.

API changes

Breadcrumb loses its set*() methods and applyTo(), i.e. any of the public methods that CacheableMetadata was providing beyond what RefinableCacheableDependencyInterface requires.

Data model changes

None.


Viewing all articles
Browse latest Browse all 313984

Trending Articles



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