PubSubHubbub/Publisher not sending requests to hubs
jabinb opened this issue · comments
Bug Report
Q | A |
---|---|
Version(s) | 2.14.0 |
Summary
It seems like the publishing always fails, and the requests to the hubs are never sent.
Current behavior
Calling $publisher->notifyAll();
results in no requests being sent.
How to reproduce
I've created a repository to reproduce the bug here: https://github.com/jabinb/laminas-feed-bug
To run it:
$ composer install
$ php -S localhost:9090 server.php
# another terminal window
$ php test.php
You'll notice no requests get sent to the built-in webserver.
Outside of the repository the steps are pretty simple, try to follow the documentation and use notifyHub
or notifyAll
and set a breakpoint to inspect the $response
object -- you'll see it's an empty response.
Expected behavior
The Publisher class sends the proper requests.
Fix
laminas-feed/src/PubSubHubbub/Publisher.php
Lines 257 to 266 in 85cf475
Seems like on line 258 there's a missing call to $client->send()
to actually trigger the request (adding it fixes the problem). Instead they just grab an empty request and return it immediately.