Autowire service arguments

This commit is contained in:
Yassine Guedidi 2022-08-27 20:22:48 +02:00
parent 76a5133545
commit dad088b575
6 changed files with 58 additions and 166 deletions

View file

@ -20,12 +20,8 @@ services:
Wallabag\CoreBundle\Twig\WallabagExtension: Wallabag\CoreBundle\Twig\WallabagExtension:
public: false public: false
arguments: arguments:
- '@Wallabag\CoreBundle\Repository\EntryRepository' $lifeTime: "%wallabag_core.cache_lifetime%"
- '@Wallabag\CoreBundle\Repository\TagRepository' $rootDir: "%kernel.root_dir%"
- "@security.token_storage"
- "%wallabag_core.cache_lifetime%"
- "@translator"
- "%kernel.root_dir%"
tags: tags:
- { name: twig.extension } - { name: twig.extension }
@ -35,12 +31,12 @@ services:
- { name: twig.extension } - { name: twig.extension }
Wallabag\CoreBundle\Event\Listener\LocaleListener: Wallabag\CoreBundle\Event\Listener\LocaleListener:
arguments: ["%kernel.default_locale%"] arguments:
$defaultLocale: "%kernel.default_locale%"
tags: tags:
- { name: kernel.event_subscriber } - { name: kernel.event_subscriber }
Wallabag\CoreBundle\Event\Listener\UserLocaleListener: Wallabag\CoreBundle\Event\Listener\UserLocaleListener:
arguments: ["@session"]
tags: tags:
- { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin }
@ -48,49 +44,41 @@ services:
class: Symfony\Component\Cache\Adapter\FilesystemAdapter class: Symfony\Component\Cache\Adapter\FilesystemAdapter
public: false public: false
arguments: arguments:
- 'craue_config' $namespace: 'craue_config'
- 0 $defaultLifetime: 0
- '%kernel.cache_dir%' $directory: '%kernel.cache_dir%'
Wallabag\CoreBundle\Helper\DetectActiveTheme: Wallabag\CoreBundle\Helper\DetectActiveTheme:
arguments: arguments:
- "@security.token_storage" $defaultTheme: "%wallabag_core.theme%"
- "%wallabag_core.theme%"
# custom form type # custom form type
Wallabag\CoreBundle\Form\Type\ConfigType: Wallabag\CoreBundle\Form\Type\ConfigType:
arguments: arguments:
- "%liip_theme.themes%" $themes: "%liip_theme.themes%"
- "%wallabag_core.languages%" $languages: "%wallabag_core.languages%"
tags: tags:
- { name: form.type } - { name: form.type }
Wallabag\CoreBundle\Form\Type\EntryFilterType: Wallabag\CoreBundle\Form\Type\EntryFilterType:
arguments:
- '@Wallabag\CoreBundle\Repository\EntryRepository'
- "@security.token_storage"
tags: tags:
- { name: form.type } - { name: form.type }
Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter: Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter:
tags: tags:
- { name: request.param_converter, converter: username_feed_token_converter } - { name: request.param_converter, converter: username_feed_token_converter }
arguments:
- "@doctrine"
Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber: Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber:
arguments: arguments:
- "%database_table_prefix%" $prefix: "%database_table_prefix%"
tags: tags:
- { name: doctrine.event_subscriber } - { name: doctrine.event_subscriber }
Graby\Graby: Graby\Graby:
arguments: arguments:
- $config:
error_message: '%wallabag_core.fetching_error_message%' error_message: '%wallabag_core.fetching_error_message%'
error_message_title: '%wallabag_core.fetching_error_message_title%' error_message_title: '%wallabag_core.fetching_error_message_title%'
- "@wallabag_core.http_client"
- '@Graby\SiteConfig\ConfigBuilder'
calls: calls:
- [ setLogger, [ "@logger" ] ] - [ setLogger, [ "@logger" ] ]
tags: tags:
@ -98,18 +86,12 @@ services:
Graby\SiteConfig\ConfigBuilder: Graby\SiteConfig\ConfigBuilder:
arguments: arguments:
- {} $config: {}
- "@logger"
wallabag_core.http_client: wallabag_core.http_client:
alias: 'httplug.client.wallabag_core' alias: 'httplug.client.wallabag_core'
Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder:
arguments:
- '@Graby\SiteConfig\ConfigBuilder'
- "@security.token_storage"
- '@Wallabag\CoreBundle\Repository\SiteCredentialRepository'
- '@logger'
tags: tags:
- { name: monolog.logger, channel: graby } - { name: monolog.logger, channel: graby }
@ -119,43 +101,24 @@ services:
Wallabag\CoreBundle\Helper\HttpClientFactory: Wallabag\CoreBundle\Helper\HttpClientFactory:
arguments: arguments:
- '@Wallabag\CoreBundle\Helper\FileCookieJar' $restrictedAccess: '@=service(''craue_config'').get(''restricted_access'')'
- '@=service(''craue_config'').get(''restricted_access'')'
- '@logger'
calls: calls:
- ["addSubscriber", ["@bd_guzzle_site_authenticator.authenticator_subscriber"]] - ["addSubscriber", ["@bd_guzzle_site_authenticator.authenticator_subscriber"]]
Wallabag\CoreBundle\Helper\FileCookieJar: Wallabag\CoreBundle\Helper\FileCookieJar:
arguments: arguments:
- "@logger" $cookieFile: "%kernel.cache_dir%/cookiejar.json"
- "%kernel.cache_dir%/cookiejar.json"
Wallabag\CoreBundle\Helper\ContentProxy: Wallabag\CoreBundle\Helper\ContentProxy:
arguments: arguments:
- '@Graby\Graby' $fetchingErrorMessage: '%wallabag_core.fetching_error_message%'
- '@Wallabag\CoreBundle\Helper\RuleBasedTagger' $storeArticleHeaders: '@=service(''craue_config'').get(''store_article_headers'')'
- '@Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor'
- "@validator"
- "@logger"
- '%wallabag_core.fetching_error_message%'
- '@=service(''craue_config'').get(''store_article_headers'')'
Wallabag\CoreBundle\Helper\TagsAssigner: Wallabag\CoreBundle\Helper\TagsAssigner: ~
arguments:
- '@Wallabag\CoreBundle\Repository\TagRepository'
Wallabag\CoreBundle\Helper\RuleBasedTagger: Wallabag\CoreBundle\Helper\RuleBasedTagger: ~
arguments:
- "@rulerz"
- '@Wallabag\CoreBundle\Repository\TagRepository'
- '@Wallabag\CoreBundle\Repository\EntryRepository'
- "@logger"
Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor: Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor: ~
arguments:
- "@rulerz"
- "@logger"
- '@Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository'
# repository as a service # repository as a service
Wallabag\CoreBundle\Repository\EntryRepository: Wallabag\CoreBundle\Repository\EntryRepository:
@ -182,10 +145,8 @@ services:
Wallabag\CoreBundle\Helper\EntriesExport: Wallabag\CoreBundle\Helper\EntriesExport:
arguments: arguments:
- "@translator" $wallabagUrl: '%domain_name%'
- '%domain_name%' $logoPath: web/img/appicon/apple-touch-icon-152.png
- web/img/appicon/apple-touch-icon-152.png
- "@security.token_storage"
Wallabag\CoreBundle\Operator\PHP\Matches: Wallabag\CoreBundle\Operator\PHP\Matches:
tags: tags:
@ -207,19 +168,13 @@ services:
tags: tags:
- { name: rulerz.operator, target: native, operator: "~" } - { name: rulerz.operator, target: native, operator: "~" }
Wallabag\CoreBundle\Helper\Redirect: Wallabag\CoreBundle\Helper\Redirect: ~
arguments:
- "@router"
- "@security.token_storage"
Wallabag\CoreBundle\Helper\PreparePagerForEntries: Wallabag\CoreBundle\Helper\PreparePagerForEntries: ~
arguments:
- "@security.token_storage"
- "@router"
Predis\Client: Predis\Client:
arguments: arguments:
- $parameters:
scheme: '%redis_scheme%' scheme: '%redis_scheme%'
host: '%redis_host%' host: '%redis_host%'
port: '%redis_port%' port: '%redis_port%'
@ -228,61 +183,47 @@ services:
Wallabag\CoreBundle\Controller\ExceptionController: Wallabag\CoreBundle\Controller\ExceptionController:
arguments: arguments:
- '@twig' $debug: '%kernel.debug%'
- '%kernel.debug%'
Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber: Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber:
arguments:
- "@doctrine"
tags: tags:
- { name: doctrine.event_subscriber } - { name: doctrine.event_subscriber }
Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber: Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber:
arguments: arguments:
- "@doctrine.orm.default_entity_manager" $enabled: '@=service(''craue_config'').get(''download_images_enabled'')'
- '@Wallabag\CoreBundle\Helper\DownloadImages'
- '@=service(''craue_config'').get(''download_images_enabled'')'
- "@logger"
tags: tags:
- { name: kernel.event_subscriber } - { name: kernel.event_subscriber }
Wallabag\CoreBundle\Helper\DownloadImages: Wallabag\CoreBundle\Helper\DownloadImages:
arguments: arguments:
- "@wallabag_core.entry.download_images.client" $baseFolder: "%kernel.project_dir%/web/assets/images"
- "%kernel.project_dir%/web/assets/images" $wallabagUrl: '%domain_name%'
- '%domain_name%'
- "@logger"
wallabag_core.entry.download_images.client: wallabag_core.entry.download_images.client:
alias: 'httplug.client.wallabag_core.entry.download_images' alias: 'httplug.client.wallabag_core.entry.download_images'
Wallabag\CoreBundle\Helper\CryptoProxy: Wallabag\CoreBundle\Helper\CryptoProxy:
arguments: arguments:
- "%wallabag_core.site_credentials.encryption_key_path%" $encryptionKeyPath: "%wallabag_core.site_credentials.encryption_key_path%"
- "@logger"
Wallabag\CoreBundle\Command\: Wallabag\CoreBundle\Command\:
resource: ../../src/Wallabag/CoreBundle/Command/* resource: ../../src/Wallabag/CoreBundle/Command/*
Wallabag\UserBundle\Mailer\AuthCodeMailer: Wallabag\UserBundle\Mailer\AuthCodeMailer:
arguments: arguments:
- "@mailer" $senderEmail: "%scheb_two_factor.email.sender_email%"
- "@twig" $senderName: "%scheb_two_factor.email.sender_name%"
- "%scheb_two_factor.email.sender_email%" $supportUrl: '@=service(''craue_config'').get(''wallabag_support_url'')'
- "%scheb_two_factor.email.sender_name%" $wallabagUrl: '%domain_name%'
- '@=service(''craue_config'').get(''wallabag_support_url'')'
- '%domain_name%'
Wallabag\UserBundle\EventListener\RegistrationListener: Wallabag\UserBundle\EventListener\RegistrationListener:
arguments: arguments:
- '%fosuser_registration%' $registrationEnabled: '%fosuser_registration%'
- '@router'
tags: tags:
- { name: kernel.event_subscriber } - { name: kernel.event_subscriber }
Wallabag\UserBundle\EventListener\PasswordResettingListener: Wallabag\UserBundle\EventListener\PasswordResettingListener:
arguments:
- "@router"
tags: tags:
- { name: kernel.event_subscriber } - { name: kernel.event_subscriber }
@ -293,22 +234,17 @@ services:
Wallabag\UserBundle\EventListener\CreateConfigListener: Wallabag\UserBundle\EventListener\CreateConfigListener:
arguments: arguments:
- "@doctrine.orm.entity_manager" $theme: "%wallabag_core.theme%"
- "%wallabag_core.theme%" $itemsOnPage: "%wallabag_core.items_on_page%"
- "%wallabag_core.items_on_page%" $feedLimit: "%wallabag_core.feed_limit%"
- "%wallabag_core.feed_limit%" $language: "%wallabag_core.language%"
- "%wallabag_core.language%" $readingSpeed: "%wallabag_core.reading_speed%"
- "%wallabag_core.reading_speed%" $actionMarkAsRead: "%wallabag_core.action_mark_as_read%"
- "%wallabag_core.action_mark_as_read%" $listMode: "%wallabag_core.list_mode%"
- "%wallabag_core.list_mode%"
- "@session"
tags: tags:
- { name: kernel.event_subscriber } - { name: kernel.event_subscriber }
Wallabag\UserBundle\EventListener\AuthenticationFailureListener: Wallabag\UserBundle\EventListener\AuthenticationFailureListener:
arguments:
- "@request_stack"
- "@logger"
tags: tags:
- { name: kernel.event_listener, event: security.authentication.failure, method: onAuthenticationFailure } - { name: kernel.event_listener, event: security.authentication.failure, method: onAuthenticationFailure }
@ -318,11 +254,6 @@ services:
alias: 'httplug.client.wallabag_import.pocket.client' alias: 'httplug.client.wallabag_import.pocket.client'
Wallabag\ImportBundle\Import\PocketImport: Wallabag\ImportBundle\Import\PocketImport:
arguments:
- "@doctrine.orm.entity_manager"
- '@Wallabag\CoreBundle\Helper\ContentProxy'
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
- "@event_dispatcher"
calls: calls:
- [ setClient, [ "@wallabag_import.pocket.client" ] ] - [ setClient, [ "@wallabag_import.pocket.client" ] ]
- [ setLogger, [ "@logger" ]] - [ setLogger, [ "@logger" ]]
@ -331,100 +262,56 @@ services:
Wallabag\ImportBundle\Import\WallabagV1Import: Wallabag\ImportBundle\Import\WallabagV1Import:
arguments: arguments:
- "@doctrine.orm.entity_manager" $fetchingErrorMessageTitle: "%wallabag_core.fetching_error_message_title%"
- '@Wallabag\CoreBundle\Helper\ContentProxy' $fetchingErrorMessage: "%wallabag_core.fetching_error_message%"
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
- "@event_dispatcher"
- "%wallabag_core.fetching_error_message_title%"
- "%wallabag_core.fetching_error_message%"
calls: calls:
- [ setLogger, [ "@logger" ]] - [ setLogger, [ "@logger" ]]
tags: tags:
- { name: wallabag_import.import, alias: wallabag_v1 } - { name: wallabag_import.import, alias: wallabag_v1 }
Wallabag\ImportBundle\Import\WallabagV2Import: Wallabag\ImportBundle\Import\WallabagV2Import:
arguments:
- "@doctrine.orm.entity_manager"
- '@Wallabag\CoreBundle\Helper\ContentProxy'
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
- "@event_dispatcher"
calls: calls:
- [ setLogger, [ "@logger" ]] - [ setLogger, [ "@logger" ]]
tags: tags:
- { name: wallabag_import.import, alias: wallabag_v2 } - { name: wallabag_import.import, alias: wallabag_v2 }
Wallabag\ImportBundle\Import\ElcuratorImport: Wallabag\ImportBundle\Import\ElcuratorImport:
arguments:
- "@doctrine.orm.entity_manager"
- '@Wallabag\CoreBundle\Helper\ContentProxy'
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
- "@event_dispatcher"
calls: calls:
- [ setLogger, [ "@logger" ]] - [ setLogger, [ "@logger" ]]
tags: tags:
- { name: wallabag_import.import, alias: elcurator } - { name: wallabag_import.import, alias: elcurator }
Wallabag\ImportBundle\Import\ReadabilityImport: Wallabag\ImportBundle\Import\ReadabilityImport:
arguments:
- "@doctrine.orm.entity_manager"
- '@Wallabag\CoreBundle\Helper\ContentProxy'
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
- "@event_dispatcher"
calls: calls:
- [ setLogger, [ "@logger" ]] - [ setLogger, [ "@logger" ]]
tags: tags:
- { name: wallabag_import.import, alias: readability } - { name: wallabag_import.import, alias: readability }
Wallabag\ImportBundle\Import\InstapaperImport: Wallabag\ImportBundle\Import\InstapaperImport:
arguments:
- "@doctrine.orm.entity_manager"
- '@Wallabag\CoreBundle\Helper\ContentProxy'
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
- "@event_dispatcher"
calls: calls:
- [ setLogger, [ "@logger" ]] - [ setLogger, [ "@logger" ]]
tags: tags:
- { name: wallabag_import.import, alias: instapaper } - { name: wallabag_import.import, alias: instapaper }
Wallabag\ImportBundle\Import\PinboardImport: Wallabag\ImportBundle\Import\PinboardImport:
arguments:
- "@doctrine.orm.entity_manager"
- '@Wallabag\CoreBundle\Helper\ContentProxy'
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
- "@event_dispatcher"
calls: calls:
- [ setLogger, [ "@logger" ]] - [ setLogger, [ "@logger" ]]
tags: tags:
- { name: wallabag_import.import, alias: pinboard } - { name: wallabag_import.import, alias: pinboard }
Wallabag\ImportBundle\Import\DeliciousImport: Wallabag\ImportBundle\Import\DeliciousImport:
arguments:
- "@doctrine.orm.entity_manager"
- '@Wallabag\CoreBundle\Helper\ContentProxy'
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
- "@event_dispatcher"
calls: calls:
- [ setLogger, [ "@logger" ]] - [ setLogger, [ "@logger" ]]
tags: tags:
- { name: wallabag_import.import, alias: delicious } - { name: wallabag_import.import, alias: delicious }
Wallabag\ImportBundle\Import\FirefoxImport: Wallabag\ImportBundle\Import\FirefoxImport:
arguments:
- "@doctrine.orm.entity_manager"
- '@Wallabag\CoreBundle\Helper\ContentProxy'
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
- "@event_dispatcher"
calls: calls:
- [ setLogger, [ "@logger" ]] - [ setLogger, [ "@logger" ]]
tags: tags:
- { name: wallabag_import.import, alias: firefox } - { name: wallabag_import.import, alias: firefox }
Wallabag\ImportBundle\Import\ChromeImport: Wallabag\ImportBundle\Import\ChromeImport:
arguments:
- "@doctrine.orm.entity_manager"
- '@Wallabag\CoreBundle\Helper\ContentProxy'
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
- "@event_dispatcher"
calls: calls:
- [ setLogger, [ "@logger" ]] - [ setLogger, [ "@logger" ]]
tags: tags:

View file

@ -2,7 +2,7 @@
namespace Wallabag\CoreBundle\Event\Subscriber; namespace Wallabag\CoreBundle\Event\Subscriber;
use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Entry;
@ -17,7 +17,7 @@ class DownloadImagesSubscriber implements EventSubscriberInterface
private $enabled; private $enabled;
private $logger; private $logger;
public function __construct(EntityManager $em, DownloadImages $downloadImages, $enabled, LoggerInterface $logger) public function __construct(EntityManagerInterface $em, DownloadImages $downloadImages, $enabled, LoggerInterface $logger)
{ {
$this->em = $em; $this->em = $em;
$this->downloadImages = $downloadImages; $this->downloadImages = $downloadImages;

View file

@ -2,7 +2,6 @@
namespace Wallabag\CoreBundle\Form\Type; namespace Wallabag\CoreBundle\Form\Type;
use Doctrine\ORM\EntityRepository;
use Lexik\Bundle\FormFilterBundle\Filter\FilterOperands; use Lexik\Bundle\FormFilterBundle\Filter\FilterOperands;
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\CheckboxFilterType; use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\CheckboxFilterType;
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\ChoiceFilterType; use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\ChoiceFilterType;
@ -15,6 +14,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Wallabag\CoreBundle\Repository\EntryRepository;
class EntryFilterType extends AbstractType class EntryFilterType extends AbstractType
{ {
@ -24,7 +24,7 @@ class EntryFilterType extends AbstractType
/** /**
* Repository & user are used to get a list of language entries for this user. * Repository & user are used to get a list of language entries for this user.
*/ */
public function __construct(EntityRepository $entryRepository, TokenStorageInterface $tokenStorage) public function __construct(EntryRepository $entryRepository, TokenStorageInterface $tokenStorage)
{ {
$this->repository = $entryRepository; $this->repository = $entryRepository;

View file

@ -2,7 +2,7 @@
namespace Wallabag\ImportBundle\Import; namespace Wallabag\ImportBundle\Import;
use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManagerInterface;
use OldSound\RabbitMqBundle\RabbitMq\ProducerInterface; use OldSound\RabbitMqBundle\RabbitMq\ProducerInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
@ -29,7 +29,7 @@ abstract class AbstractImport implements ImportInterface
protected $importedEntries = 0; protected $importedEntries = 0;
protected $queuedEntries = 0; protected $queuedEntries = 0;
public function __construct(EntityManager $em, ContentProxy $contentProxy, TagsAssigner $tagsAssigner, EventDispatcherInterface $eventDispatcher) public function __construct(EntityManagerInterface $em, ContentProxy $contentProxy, TagsAssigner $tagsAssigner, EventDispatcherInterface $eventDispatcher)
{ {
$this->em = $em; $this->em = $em;
$this->logger = new NullLogger(); $this->logger = new NullLogger();

View file

@ -2,12 +2,17 @@
namespace Wallabag\ImportBundle\Import; namespace Wallabag\ImportBundle\Import;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
class WallabagV1Import extends WallabagImport class WallabagV1Import extends WallabagImport
{ {
protected $fetchingErrorMessage; protected $fetchingErrorMessage;
protected $fetchingErrorMessageTitle; protected $fetchingErrorMessageTitle;
public function __construct($em, $contentProxy, $tagsAssigner, $eventDispatcher, $fetchingErrorMessageTitle, $fetchingErrorMessage) public function __construct(EntityManagerInterface $em, ContentProxy $contentProxy, TagsAssigner $tagsAssigner, EventDispatcherInterface $eventDispatcher, $fetchingErrorMessageTitle, $fetchingErrorMessage)
{ {
$this->fetchingErrorMessageTitle = $fetchingErrorMessageTitle; $this->fetchingErrorMessageTitle = $fetchingErrorMessageTitle;
$this->fetchingErrorMessage = $fetchingErrorMessage; $this->fetchingErrorMessage = $fetchingErrorMessage;

View file

@ -2,7 +2,7 @@
namespace Wallabag\UserBundle\EventListener; namespace Wallabag\UserBundle\EventListener;
use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManagerInterface;
use FOS\UserBundle\Event\UserEvent; use FOS\UserBundle\Event\UserEvent;
use FOS\UserBundle\FOSUserEvents; use FOS\UserBundle\FOSUserEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@ -25,7 +25,7 @@ class CreateConfigListener implements EventSubscriberInterface
private $listMode; private $listMode;
private $session; private $session;
public function __construct(EntityManager $em, $theme, $itemsOnPage, $feedLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode, Session $session) public function __construct(EntityManagerInterface $em, $theme, $itemsOnPage, $feedLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode, Session $session)
{ {
$this->em = $em; $this->em = $em;
$this->theme = $theme; $this->theme = $theme;