PubSubHubbub is using removed Guzzle dependencies

Created on 13 February 2023, over 1 year ago
Updated 13 July 2024, 3 months ago

Problem/Motivation

Drupal\feeds\EventSubscriber\PubSubHubbub.php is using


    use GuzzleHttp\Url;

    // Used to make other URLs absolute.
    $source_url = Url::fromString($feed->getSource());

    $hub = (string) $source_url->combine($hub);

Which are no longer existing nor supported on 6.0 version of the GuzzleHttp library.

Proposed resolution

Use an alternative for making URLs absolute and combining them.

Reading the Upgrade.md file of guzzlehttp/guzzle library, it states that from 6.0:

- Guzzle now uses `Psr\Http\Message\UriInterface` (implements in
`GuzzleHttp\Psr7\Uri`) for URI support. `GuzzleHttp\Url` is now gone.

But neither `Psr\Http\Message\UriInterface` nor `GuzzleHttp\Psr7\Uri` can be considered drop-in replacements as they don't implement static `fromString` or `combine` methods.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Component

Code

Created by

🇪🇸Spain idiaz.roncero Madrid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @idiaz.roncero
  • 🇳🇱Netherlands megachriz

    In the approximately 10 years that I now work on Feeds, I never got into figuring out how to use PubSubHubbub, so I can imagine that this part of Feeds could be broken. It is quite probable that there's no good test coverage for it.

    Do you use PubSubHubbub? If so, you're welcome to become co-maintainer of Feeds just to maintain this part.

  • 🇪🇸Spain idiaz.roncero Madrid

    I was trying to get a Youtube feed. Feeds Youtube seems abandoned (and is not working) and Youtube Import is a standalone solution that has no integration with Feeds and thus lacks some of its power (mappings, etc).

    I found that YouTube somehow still supports PubSubHubbub channels (it's hidden, but exists) and then tried to use this part of the Feeds module, and this is when I hit with this problem.

    For the time being I'm actually working on a patch (or an alternative) to Feeds Youtube since using Youtube API V3 seems to be the most reliable and long-term supported solution.

    And no, I haven't the faintest idea about how Pubsubhubbub is supposed to work, sorry.

    So... unless more people complains about PubSubHubbub not working, I think maybe the best solution is to skip this (or even remove it altogether) and focus on more modern, contemporary solutions to the problem.

  • 🇮🇹Italy kopeboy Milan

    Never used PubSubHubbub either but it actually might be worth to still support it since there are some "recent" (in W3C terms and relative to relevant issues on this module) news.. check "WebSub" (linked from here) which is a W3C Recommendation from 23 January 2018. The interesting part should be that it uses HTTPS Webhooks, but since I'm a noob developer I don't know what that means for Drupal (specifically how they interact with / if they require Cron).

  • 🇳🇱Netherlands megachriz

    This now also comes up in PHPStan reports. I'm going to disable the feature in the UI for now.

  • Pipeline finished with Skipped
    3 months ago
    #223246
    • MegaChriz committed b8c200dc on 8.x-3.x
      Issue #3341361 by MegaChriz: Disable PubSubHubbub in the UI because it...
  • 🇳🇱Netherlands megachriz

    The option "Use PubSubHubbub" is now disabled in the UI and a link to this issue is added underneath:

    I also checked Drupal 8.0.0 and I saw that GuzzleHttp\Url was already gone in there. So apparently this feature is broken in Feeds 8.x-3.x for many years (Drupal 8.0.0 was released 8.5 years ago). So it looks like that not a single Feeds 8.x-3.x user is using PubSubHubbub currently. Or they fixed it without reporting or giving back. So that would make this feature candidate from being removed from Feeds in the future, if still no one cares about it.

Production build 0.71.5 2024