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.
Everything that typehints Feed
should typehint FeedInterface
instead
Comment | File | Size | Author |
---|---|---|---|
#7 | drupal-aggregator-feedinterface-typehints-2191273-7.patch | 18.19 KB | mfernea |
Comments
Comment #1
mfernea CreditAttribution: mfernea commentedI'll work on this and post a patch later on.
Comment #2
mfernea CreditAttribution: mfernea commentedHere is the patch.
I don't think that "EntityInterface" inside "template_preprocess_aggregator_summary_items" should be replaced, should it?
$variables['title'] = check_plain($variables['source'] instanceof EntityInterface ? $variables['source']->label() : $variables['source']->title);
and
$variables['source_url'] = $variables['source'] instanceof EntityInterface ? $variables['source']->url->value : $variables['source']->url;
Comment #4
mfernea CreditAttribution: mfernea commentedIt needed a reroll.
Comment #5
ParisLiakos CreditAttribution: ParisLiakos commentedthanks for the patch!
the instanceof EntityInterface is a temp hack and we should be able to remove it in #1957312: Use the entity storage controller in aggregator module
so you can leave it as is.
i think your patch needs one more reroll unfortunately due to #2138115: Split aggregator theme functions to a separate file
Comment #6
mfernea CreditAttribution: mfernea commentedOk. Here is the new patch.
Comment #7
mfernea CreditAttribution: mfernea commentedWith the new modifications I missed 2 usages of Feed. I fixed that.
Comment #8
ParisLiakos CreditAttribution: ParisLiakos commentedthank you!
Comment #9
xjmMoving to the documentation queue for @jhodgdon.
Comment #10
jhodgdonThis is not all documentation. There are use statements being changed in several places. I'll let one of the other committers take this one.
Comment #11
mfernea CreditAttribution: mfernea commentedI looked over all change records that mentioned Feed and I found those two in which I modified the typehinting:
https://drupal.org/node/2078169
https://drupal.org/node/1957310
Comment #12
alexpottCommitted 2d65e60 and pushed to 8.x. Thanks!