Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Classes/Controller/FeedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
namespace ErHaWeb\FeedDisplay\Controller;

use ErHaWeb\FeedDisplay\Event\SingleFeedDataEvent;
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\RequestFactoryInterface;
use Psr\Http\Message\UriFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use SimplePie\SimplePie;
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
Expand All @@ -33,6 +36,9 @@ class FeedController extends ActionController
{
public function __construct(
private readonly FrontendInterface $cache,
private readonly ClientInterface $client,
private readonly RequestFactoryInterface $requestFactory,
private readonly UriFactoryInterface $uriFactory,
private readonly SimplePie $feed
) {}

Expand Down Expand Up @@ -159,6 +165,7 @@ private function initFeed(): bool
$feedUrl = stripslashes((string)$feedUrl);
$this->feed->set_feed_url($feedUrl);
$this->feed->enable_cache(false);
$this->feed->set_http_client($this->client, $this->requestFactory, $this->uriFactory);
$this->feed->init();
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"require": {
"typo3/cms-core": "^12.4 || ^13.0",
"php": "^8.1 || ^8.2 || ^8.3",
"simplepie/simplepie": "^1.8"
"simplepie/simplepie": "^1.9 || dev-master"
},
"require-dev": {
"roave/security-advisories": "dev-latest"
Expand Down