From a298c400955093ecb2fa8be23028555f47850396 Mon Sep 17 00:00:00 2001 From: Alex Debril Date: Thu, 25 Jul 2019 18:38:15 +0200 Subject: [PATCH] Use `AbstractController` instead of `Controller` --- Controller/StreamController.php | 8 ++++---- Resources/config/services.yml | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Controller/StreamController.php b/Controller/StreamController.php index 49940fa..906ba2c 100644 --- a/Controller/StreamController.php +++ b/Controller/StreamController.php @@ -4,16 +4,16 @@ use FeedIo\FeedIo; use FeedIo\FeedInterface; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Debril\RssAtomBundle\Provider\FeedContentProviderInterface; use Debril\RssAtomBundle\Exception\FeedException\FeedNotFoundException; /** * Class StreamController. */ -class StreamController extends Controller +class StreamController extends AbstractController { /** @@ -156,7 +156,7 @@ protected function getContent(array $options, FeedContentProviderInterface $prov */ protected function mustForceRefresh() : bool { - return $this->container->getParameter('debril_rss_atom.force_refresh'); + return $this->getParameter('debril_rss_atom.force_refresh'); } /** @@ -164,7 +164,7 @@ protected function mustForceRefresh() : bool */ protected function isPrivate() : bool { - return $this->container->getParameter('debril_rss_atom.private_feeds'); + return $this->getParameter('debril_rss_atom.private_feeds'); } } diff --git a/Resources/config/services.yml b/Resources/config/services.yml index b092d11..7faacd2 100644 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -4,6 +4,10 @@ parameters: debril.provider.doctrine.class: Debril\RssAtomBundle\Provider\DoctrineFeedContentProvider services: + _defaults: + autowire: true + autoconfigure: true + guzzle.client: class: GuzzleHttp\Client