mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-11 01:15:26 +00:00
commit
70d7c2af5f
35 changed files with 398 additions and 695 deletions
|
@ -1,40 +1,65 @@
|
|||
imports:
|
||||
- { resource: services_rabbit.yml }
|
||||
- { resource: services_redis.yml }
|
||||
- { resource: parameters_addons.yml }
|
||||
|
||||
parameters:
|
||||
lexik_form_filter.get_filter.doctrine_orm.class: Wallabag\CoreBundle\Event\Subscriber\CustomDoctrineORMSubscriber
|
||||
|
||||
services:
|
||||
_defaults:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
public: true
|
||||
bind:
|
||||
$rootDir: '%kernel.root_dir%'
|
||||
$debug: '%kernel.debug%'
|
||||
$defaultLocale: '%kernel.default_locale%'
|
||||
$wallabagUrl: '%domain_name%'
|
||||
$tablePrefix: "%database_table_prefix%"
|
||||
$defaultTheme: '%wallabag_core.theme%'
|
||||
$encryptionKeyPath: "%wallabag_core.site_credentials.encryption_key_path%"
|
||||
$fetchingErrorMessageTitle: "%wallabag_core.fetching_error_message_title%"
|
||||
$fetchingErrorMessage: '%wallabag_core.fetching_error_message%'
|
||||
$languages: '%wallabag_core.languages%'
|
||||
$lifeTime: '%wallabag_core.cache_lifetime%'
|
||||
$cookieFile: "%kernel.cache_dir%/cookiejar.json"
|
||||
$logoPath: 'web/img/appicon/apple-touch-icon-152.png'
|
||||
$registrationEnabled: '%fosuser_registration%'
|
||||
$restrictedAccess: '@=service(''craue_config'').get(''restricted_access'')'
|
||||
$senderEmail: "%scheb_two_factor.email.sender_email%"
|
||||
$senderName: "%scheb_two_factor.email.sender_name%"
|
||||
$storeArticleHeaders: '@=service(''craue_config'').get(''store_article_headers'')'
|
||||
$supportUrl: '@=service(''craue_config'').get(''wallabag_support_url'')'
|
||||
$themes: '%liip_theme.themes%'
|
||||
|
||||
Wallabag\AnnotationBundle\:
|
||||
resource: '../../src/Wallabag/AnnotationBundle/*'
|
||||
exclude: '../../src/Wallabag/AnnotationBundle/{Controller,Entity}'
|
||||
|
||||
Wallabag\ApiBundle\:
|
||||
resource: '../../src/Wallabag/ApiBundle/*'
|
||||
exclude: '../../src/Wallabag/ApiBundle/{Controller,Entity}'
|
||||
|
||||
Wallabag\CoreBundle\:
|
||||
resource: '../../src/Wallabag/CoreBundle/*'
|
||||
exclude: '../../src/Wallabag/CoreBundle/{Controller,Entity}'
|
||||
|
||||
Wallabag\ImportBundle\:
|
||||
resource: '../../src/Wallabag/ImportBundle/*'
|
||||
exclude: '../../src/Wallabag/ImportBundle/{Consumer,Controller,Redis}'
|
||||
|
||||
Wallabag\UserBundle\:
|
||||
resource: '../../src/Wallabag/UserBundle/*'
|
||||
exclude: '../../src/Wallabag/UserBundle/{Controller,Entity}'
|
||||
|
||||
Twig_Extensions_Extension_Text:
|
||||
class: Twig_Extensions_Extension_Text
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
Wallabag\CoreBundle\Twig\WallabagExtension:
|
||||
class: Wallabag\CoreBundle\Twig\WallabagExtension
|
||||
public: false
|
||||
arguments:
|
||||
- '@Wallabag\CoreBundle\Repository\EntryRepository'
|
||||
- '@Wallabag\CoreBundle\Repository\TagRepository'
|
||||
- "@security.token_storage"
|
||||
- "%wallabag_core.cache_lifetime%"
|
||||
- "@translator"
|
||||
- "%kernel.root_dir%"
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
MatomoTwigExtension\MatomoTwigExtension:
|
||||
class: MatomoTwigExtension\MatomoTwigExtension
|
||||
public: false
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
Wallabag\CoreBundle\Event\Listener\LocaleListener:
|
||||
class: Wallabag\CoreBundle\Event\Listener\LocaleListener
|
||||
arguments: ["%kernel.default_locale%"]
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
Wallabag\CoreBundle\Event\Listener\UserLocaleListener:
|
||||
class: Wallabag\CoreBundle\Event\Listener\UserLocaleListener
|
||||
arguments: ["@session"]
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin }
|
||||
|
||||
|
@ -42,6 +67,148 @@ services:
|
|||
class: Symfony\Component\Cache\Adapter\FilesystemAdapter
|
||||
public: false
|
||||
arguments:
|
||||
- 'craue_config'
|
||||
- 0
|
||||
- '%kernel.cache_dir%'
|
||||
$namespace: 'craue_config'
|
||||
$defaultLifetime: 0
|
||||
$directory: '%kernel.cache_dir%'
|
||||
|
||||
Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter:
|
||||
tags:
|
||||
- { name: request.param_converter, converter: username_feed_token_converter }
|
||||
|
||||
Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber:
|
||||
tags:
|
||||
- { name: doctrine.event_subscriber }
|
||||
|
||||
Graby\Graby:
|
||||
arguments:
|
||||
$config:
|
||||
error_message: '%wallabag_core.fetching_error_message%'
|
||||
error_message_title: '%wallabag_core.fetching_error_message_title%'
|
||||
calls:
|
||||
- [ setLogger, [ "@logger" ] ]
|
||||
tags:
|
||||
- { name: monolog.logger, channel: graby }
|
||||
|
||||
Graby\SiteConfig\ConfigBuilder:
|
||||
arguments:
|
||||
$config: {}
|
||||
|
||||
wallabag_core.http_client:
|
||||
alias: 'httplug.client.wallabag_core'
|
||||
|
||||
Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder:
|
||||
tags:
|
||||
- { name: monolog.logger, channel: graby }
|
||||
|
||||
# service alias override
|
||||
bd_guzzle_site_authenticator.site_config_builder:
|
||||
alias: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder
|
||||
|
||||
Wallabag\CoreBundle\Helper\HttpClientFactory:
|
||||
calls:
|
||||
- ["addSubscriber", ["@bd_guzzle_site_authenticator.authenticator_subscriber"]]
|
||||
|
||||
Wallabag\CoreBundle\Operator\PHP\Matches:
|
||||
tags:
|
||||
- { name: rulerz.operator, target: native, operator: matches }
|
||||
|
||||
Wallabag\CoreBundle\Operator\Doctrine\Matches:
|
||||
tags:
|
||||
- { name: rulerz.operator, target: doctrine, operator: matches, inline: true }
|
||||
|
||||
Wallabag\CoreBundle\Operator\PHP\NotMatches:
|
||||
tags:
|
||||
- { name: rulerz.operator, target: native, operator: notmatches }
|
||||
|
||||
Wallabag\CoreBundle\Operator\Doctrine\NotMatches:
|
||||
tags:
|
||||
- { name: rulerz.operator, target: doctrine, operator: notmatches, inline: true }
|
||||
|
||||
Wallabag\CoreBundle\Operator\PHP\PatternMatches:
|
||||
tags:
|
||||
- { name: rulerz.operator, target: native, operator: "~" }
|
||||
|
||||
Predis\Client:
|
||||
arguments:
|
||||
$parameters:
|
||||
scheme: '%redis_scheme%'
|
||||
host: '%redis_host%'
|
||||
port: '%redis_port%'
|
||||
path: '%redis_path%'
|
||||
password: '%redis_password%'
|
||||
|
||||
Wallabag\CoreBundle\Controller\ExceptionController: ~
|
||||
|
||||
Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber:
|
||||
tags:
|
||||
- { name: doctrine.event_subscriber }
|
||||
|
||||
Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber:
|
||||
arguments:
|
||||
$enabled: '@=service(''craue_config'').get(''download_images_enabled'')'
|
||||
|
||||
Wallabag\CoreBundle\Helper\DownloadImages:
|
||||
arguments:
|
||||
$baseFolder: "%kernel.project_dir%/web/assets/images"
|
||||
|
||||
wallabag_core.entry.download_images.client:
|
||||
alias: 'httplug.client.wallabag_core.entry.download_images'
|
||||
|
||||
Wallabag\UserBundle\EventListener\CreateConfigListener:
|
||||
arguments:
|
||||
$theme: "%wallabag_core.theme%"
|
||||
$itemsOnPage: "%wallabag_core.items_on_page%"
|
||||
$feedLimit: "%wallabag_core.feed_limit%"
|
||||
$language: "%wallabag_core.language%"
|
||||
$readingSpeed: "%wallabag_core.reading_speed%"
|
||||
$actionMarkAsRead: "%wallabag_core.action_mark_as_read%"
|
||||
$listMode: "%wallabag_core.list_mode%"
|
||||
|
||||
Wallabag\UserBundle\EventListener\AuthenticationFailureListener:
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: security.authentication.failure, method: onAuthenticationFailure }
|
||||
|
||||
wallabag_import.pocket.client:
|
||||
alias: 'httplug.client.wallabag_import.pocket.client'
|
||||
|
||||
Wallabag\ImportBundle\Import\PocketImport:
|
||||
calls:
|
||||
- [ setClient, [ "@wallabag_import.pocket.client" ] ]
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: pocket }
|
||||
|
||||
Wallabag\ImportBundle\Import\WallabagV1Import:
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: wallabag_v1 }
|
||||
|
||||
Wallabag\ImportBundle\Import\WallabagV2Import:
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: wallabag_v2 }
|
||||
|
||||
Wallabag\ImportBundle\Import\ElcuratorImport:
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: elcurator }
|
||||
|
||||
Wallabag\ImportBundle\Import\ReadabilityImport:
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: readability }
|
||||
|
||||
Wallabag\ImportBundle\Import\InstapaperImport:
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: instapaper }
|
||||
|
||||
Wallabag\ImportBundle\Import\PinboardImport:
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: pinboard }
|
||||
|
||||
Wallabag\ImportBundle\Import\DeliciousImport:
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: delicious }
|
||||
|
||||
Wallabag\ImportBundle\Import\FirefoxImport:
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: firefox }
|
||||
|
||||
Wallabag\ImportBundle\Import\ChromeImport:
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: chrome }
|
||||
|
|
56
app/config/services_rabbit.yml
Normal file
56
app/config/services_rabbit.yml
Normal file
|
@ -0,0 +1,56 @@
|
|||
# RabbitMQ stuff
|
||||
services:
|
||||
_defaults:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
public: true
|
||||
|
||||
wallabag_import.consumer.amqp.pocket:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
$import: '@Wallabag\ImportBundle\Import\PocketImport'
|
||||
|
||||
wallabag_import.consumer.amqp.readability:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
$import: '@Wallabag\ImportBundle\Import\ReadabilityImport'
|
||||
|
||||
wallabag_import.consumer.amqp.instapaper:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
$import: '@Wallabag\ImportBundle\Import\InstapaperImport'
|
||||
|
||||
wallabag_import.consumer.amqp.pinboard:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
$import: '@Wallabag\ImportBundle\Import\PinboardImport'
|
||||
|
||||
wallabag_import.consumer.amqp.delicious:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
$import: '@Wallabag\ImportBundle\Import\DeliciousImport'
|
||||
|
||||
wallabag_import.consumer.amqp.wallabag_v1:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
$import: '@Wallabag\ImportBundle\Import\WallabagV1Import'
|
||||
|
||||
wallabag_import.consumer.amqp.wallabag_v2:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
$import: '@Wallabag\ImportBundle\Import\WallabagV2Import'
|
||||
|
||||
wallabag_import.consumer.amqp.elcurator:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
$import: '@Wallabag\ImportBundle\Import\ElcuratorImport'
|
||||
|
||||
wallabag_import.consumer.amqp.firefox:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
$import: '@Wallabag\ImportBundle\Import\FirefoxImport'
|
||||
|
||||
wallabag_import.consumer.amqp.chrome:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
$import: '@Wallabag\ImportBundle\Import\ChromeImport'
|
|
@ -1,11 +1,15 @@
|
|||
# Redis stuff
|
||||
services:
|
||||
_defaults:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
public: true
|
||||
|
||||
# readability
|
||||
wallabag_import.queue.redis.readability:
|
||||
class: Simpleue\Queue\RedisQueue
|
||||
arguments:
|
||||
- '@Predis\Client'
|
||||
- "wallabag.import.readability"
|
||||
$queueName: "wallabag.import.readability"
|
||||
|
||||
wallabag_import.producer.redis.readability:
|
||||
class: Wallabag\ImportBundle\Redis\Producer
|
||||
|
@ -15,18 +19,13 @@ services:
|
|||
wallabag_import.consumer.redis.readability:
|
||||
class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\ReadabilityImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
$import: '@Wallabag\ImportBundle\Import\ReadabilityImport'
|
||||
|
||||
# instapaper
|
||||
wallabag_import.queue.redis.instapaper:
|
||||
class: Simpleue\Queue\RedisQueue
|
||||
arguments:
|
||||
- '@Predis\Client'
|
||||
- "wallabag.import.instapaper"
|
||||
$queueName: "wallabag.import.instapaper"
|
||||
|
||||
wallabag_import.producer.redis.instapaper:
|
||||
class: Wallabag\ImportBundle\Redis\Producer
|
||||
|
@ -36,18 +35,13 @@ services:
|
|||
wallabag_import.consumer.redis.instapaper:
|
||||
class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\InstapaperImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
$import: '@Wallabag\ImportBundle\Import\InstapaperImport'
|
||||
|
||||
# pinboard
|
||||
wallabag_import.queue.redis.pinboard:
|
||||
class: Simpleue\Queue\RedisQueue
|
||||
arguments:
|
||||
- '@Predis\Client'
|
||||
- "wallabag.import.pinboard"
|
||||
$queueName: "wallabag.import.pinboard"
|
||||
|
||||
wallabag_import.producer.redis.pinboard:
|
||||
class: Wallabag\ImportBundle\Redis\Producer
|
||||
|
@ -57,18 +51,13 @@ services:
|
|||
wallabag_import.consumer.redis.pinboard:
|
||||
class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\PinboardImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
$import: '@Wallabag\ImportBundle\Import\PinboardImport'
|
||||
|
||||
# delicious
|
||||
wallabag_import.queue.redis.delicious:
|
||||
class: Simpleue\Queue\RedisQueue
|
||||
arguments:
|
||||
- '@Predis\Client'
|
||||
- "wallabag.import.delicious"
|
||||
$queueName: "wallabag.import.delicious"
|
||||
|
||||
wallabag_import.producer.redis.delicious:
|
||||
class: Wallabag\ImportBundle\Redis\Producer
|
||||
|
@ -78,18 +67,13 @@ services:
|
|||
wallabag_import.consumer.redis.delicious:
|
||||
class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\DeliciousImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
$import: '@Wallabag\ImportBundle\Import\DeliciousImport'
|
||||
|
||||
# pocket
|
||||
wallabag_import.queue.redis.pocket:
|
||||
class: Simpleue\Queue\RedisQueue
|
||||
arguments:
|
||||
- '@Predis\Client'
|
||||
- "wallabag.import.pocket"
|
||||
$queueName: "wallabag.import.pocket"
|
||||
|
||||
wallabag_import.producer.redis.pocket:
|
||||
class: Wallabag\ImportBundle\Redis\Producer
|
||||
|
@ -99,18 +83,13 @@ services:
|
|||
wallabag_import.consumer.redis.pocket:
|
||||
class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\PocketImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
$import: '@Wallabag\ImportBundle\Import\PocketImport'
|
||||
|
||||
# wallabag v1
|
||||
wallabag_import.queue.redis.wallabag_v1:
|
||||
class: Simpleue\Queue\RedisQueue
|
||||
arguments:
|
||||
- '@Predis\Client'
|
||||
- "wallabag.import.wallabag_v1"
|
||||
$queueName: "wallabag.import.wallabag_v1"
|
||||
|
||||
wallabag_import.producer.redis.wallabag_v1:
|
||||
class: Wallabag\ImportBundle\Redis\Producer
|
||||
|
@ -120,18 +99,13 @@ services:
|
|||
wallabag_import.consumer.redis.wallabag_v1:
|
||||
class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\WallabagV1Import'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
$import: '@Wallabag\ImportBundle\Import\WallabagV1Import'
|
||||
|
||||
# wallabag v2
|
||||
wallabag_import.queue.redis.wallabag_v2:
|
||||
class: Simpleue\Queue\RedisQueue
|
||||
arguments:
|
||||
- '@Predis\Client'
|
||||
- "wallabag.import.wallabag_v2"
|
||||
$queueName: "wallabag.import.wallabag_v2"
|
||||
|
||||
wallabag_import.producer.redis.wallabag_v2:
|
||||
class: Wallabag\ImportBundle\Redis\Producer
|
||||
|
@ -141,18 +115,13 @@ services:
|
|||
wallabag_import.consumer.redis.wallabag_v2:
|
||||
class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\WallabagV2Import'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
$import: '@Wallabag\ImportBundle\Import\WallabagV2Import'
|
||||
|
||||
# elcurator
|
||||
wallabag_import.queue.redis.elcurator:
|
||||
class: Simpleue\Queue\RedisQueue
|
||||
arguments:
|
||||
- '@Predis\Client'
|
||||
- "wallabag.import.elcurator"
|
||||
$queueName: "wallabag.import.elcurator"
|
||||
|
||||
wallabag_import.producer.redis.elcurator:
|
||||
class: Wallabag\ImportBundle\Redis\Producer
|
||||
|
@ -162,18 +131,13 @@ services:
|
|||
wallabag_import.consumer.redis.elcurator:
|
||||
class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\ElcuratorImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
$import: '@Wallabag\ImportBundle\Import\ElcuratorImport'
|
||||
|
||||
# firefox
|
||||
wallabag_import.queue.redis.firefox:
|
||||
class: Simpleue\Queue\RedisQueue
|
||||
arguments:
|
||||
- '@Predis\Client'
|
||||
- "wallabag.import.firefox"
|
||||
$queueName: "wallabag.import.firefox"
|
||||
|
||||
wallabag_import.producer.redis.firefox:
|
||||
class: Wallabag\ImportBundle\Redis\Producer
|
||||
|
@ -183,18 +147,13 @@ services:
|
|||
wallabag_import.consumer.redis.firefox:
|
||||
class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\FirefoxImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
$import: '@Wallabag\ImportBundle\Import\FirefoxImport'
|
||||
|
||||
# chrome
|
||||
wallabag_import.queue.redis.chrome:
|
||||
class: Simpleue\Queue\RedisQueue
|
||||
arguments:
|
||||
- '@Predis\Client'
|
||||
- "wallabag.import.chrome"
|
||||
$queueName: "wallabag.import.chrome"
|
||||
|
||||
wallabag_import.producer.redis.chrome:
|
||||
class: Wallabag\ImportBundle\Redis\Producer
|
||||
|
@ -204,8 +163,4 @@ services:
|
|||
wallabag_import.consumer.redis.chrome:
|
||||
class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\ChromeImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
$import: '@Wallabag\ImportBundle\Import\ChromeImport'
|
|
@ -2,15 +2,21 @@
|
|||
|
||||
namespace Wallabag\AnnotationBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||
|
||||
/**
|
||||
* AnnotationRepository.
|
||||
*/
|
||||
class AnnotationRepository extends EntityRepository
|
||||
class AnnotationRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Annotation::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves all annotations for a user.
|
||||
*
|
||||
|
|
|
@ -2,10 +2,17 @@
|
|||
|
||||
namespace Wallabag\ApiBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Wallabag\ApiBundle\Entity\Client;
|
||||
|
||||
class ClientRepository extends EntityRepository
|
||||
class ClientRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Client::class);
|
||||
}
|
||||
|
||||
public function findOneBy(array $criteria, array $orderBy = null)
|
||||
{
|
||||
if (!empty($criteria['id'])) {
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Loader;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
|
||||
class WallabagCoreExtension extends Extension
|
||||
|
@ -31,10 +29,6 @@ class WallabagCoreExtension extends Extension
|
|||
$container->setParameter('wallabag_core.default_internal_settings', $config['default_internal_settings']);
|
||||
$container->setParameter('wallabag_core.site_credentials.encryption_key_path', $config['encryption_key_path']);
|
||||
$container->setParameter('wallabag_core.default_ignore_origin_instance_rules', $config['default_ignore_origin_instance_rules']);
|
||||
|
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
|
||||
$loader->load('services.yml');
|
||||
$loader->load('parameters.yml');
|
||||
}
|
||||
|
||||
public function getAlias()
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\Event\Subscriber;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
@ -17,7 +17,7 @@ class DownloadImagesSubscriber implements EventSubscriberInterface
|
|||
private $enabled;
|
||||
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->downloadImages = $downloadImages;
|
||||
|
|
|
@ -18,11 +18,11 @@ use Doctrine\ORM\Mapping\ClassMetadataInfo;
|
|||
*/
|
||||
class TablePrefixSubscriber implements EventSubscriber
|
||||
{
|
||||
protected $prefix = '';
|
||||
protected $tablePrefix = '';
|
||||
|
||||
public function __construct($prefix)
|
||||
public function __construct($tablePrefix)
|
||||
{
|
||||
$this->prefix = (string) $prefix;
|
||||
$this->tablePrefix = (string) $tablePrefix;
|
||||
}
|
||||
|
||||
public function getSubscribedEvents()
|
||||
|
@ -39,12 +39,12 @@ class TablePrefixSubscriber implements EventSubscriber
|
|||
return;
|
||||
}
|
||||
|
||||
$classMetadata->setPrimaryTable(['name' => $this->prefix . $classMetadata->getTableName()]);
|
||||
$classMetadata->setPrimaryTable(['name' => $this->tablePrefix . $classMetadata->getTableName()]);
|
||||
|
||||
foreach ($classMetadata->getAssociationMappings() as $fieldName => $mapping) {
|
||||
if (ClassMetadataInfo::MANY_TO_MANY === $mapping['type'] && isset($classMetadata->associationMappings[$fieldName]['joinTable']['name'])) {
|
||||
$mappedTableName = $classMetadata->associationMappings[$fieldName]['joinTable']['name'];
|
||||
$classMetadata->associationMappings[$fieldName]['joinTable']['name'] = $this->prefix . $mappedTableName;
|
||||
$classMetadata->associationMappings[$fieldName]['joinTable']['name'] = $this->tablePrefix . $mappedTableName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\Form\Type;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\FilterOperands;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\CheckboxFilterType;
|
||||
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\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
|
||||
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.
|
||||
*/
|
||||
public function __construct(EntityRepository $entryRepository, TokenStorageInterface $tokenStorage)
|
||||
public function __construct(EntryRepository $entryRepository, TokenStorageInterface $tokenStorage)
|
||||
{
|
||||
$this->repository = $entryRepository;
|
||||
|
||||
|
|
|
@ -2,8 +2,14 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Wallabag\CoreBundle\Entity\Config;
|
||||
|
||||
class ConfigRepository extends EntityRepository
|
||||
class ConfigRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Config::class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,17 +2,23 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\ORM\NoResultException;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Pagerfanta\Doctrine\ORM\QueryAdapter as DoctrineORMAdapter;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
use Wallabag\CoreBundle\Helper\UrlHasher;
|
||||
|
||||
class EntryRepository extends EntityRepository
|
||||
class EntryRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Entry::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves all entries for a user.
|
||||
*
|
||||
|
|
|
@ -2,8 +2,14 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule;
|
||||
|
||||
class IgnoreOriginInstanceRuleRepository extends EntityRepository
|
||||
class IgnoreOriginInstanceRuleRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, IgnoreOriginInstanceRule::class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,14 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
|
||||
|
||||
class IgnoreOriginUserRuleRepository extends EntityRepository
|
||||
class IgnoreOriginUserRuleRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, IgnoreOriginUserRule::class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,17 +2,22 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\Repository;
|
||||
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Wallabag\CoreBundle\Entity\SiteCredential;
|
||||
use Wallabag\CoreBundle\Helper\CryptoProxy;
|
||||
|
||||
/**
|
||||
* SiteCredentialRepository.
|
||||
*/
|
||||
class SiteCredentialRepository extends \Doctrine\ORM\EntityRepository
|
||||
class SiteCredentialRepository extends ServiceEntityRepository
|
||||
{
|
||||
private $cryptoProxy;
|
||||
|
||||
public function setCrypto(CryptoProxy $cryptoProxy)
|
||||
public function __construct(ManagerRegistry $registry, CryptoProxy $cryptoProxy)
|
||||
{
|
||||
parent::__construct($registry, SiteCredential::class);
|
||||
|
||||
$this->cryptoProxy = $cryptoProxy;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,12 +2,18 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
|
||||
class TagRepository extends EntityRepository
|
||||
class TagRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Tag::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Count all tags per user.
|
||||
*
|
||||
|
|
|
@ -2,8 +2,14 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Wallabag\CoreBundle\Entity\TaggingRule;
|
||||
|
||||
class TaggingRuleRepository extends EntityRepository
|
||||
class TaggingRuleRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, TaggingRule::class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,246 +0,0 @@
|
|||
services:
|
||||
Wallabag\CoreBundle\Helper\DetectActiveTheme:
|
||||
class: Wallabag\CoreBundle\Helper\DetectActiveTheme
|
||||
arguments:
|
||||
- "@security.token_storage"
|
||||
- "%wallabag_core.theme%"
|
||||
|
||||
# custom form type
|
||||
Wallabag\CoreBundle\Form\Type\ConfigType:
|
||||
class: Wallabag\CoreBundle\Form\Type\ConfigType
|
||||
arguments:
|
||||
- "%liip_theme.themes%"
|
||||
- "%wallabag_core.languages%"
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
||||
Wallabag\CoreBundle\Form\Type\EntryFilterType:
|
||||
class: Wallabag\CoreBundle\Form\Type\EntryFilterType
|
||||
arguments:
|
||||
- '@Wallabag\CoreBundle\Repository\EntryRepository'
|
||||
- "@security.token_storage"
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
||||
Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter:
|
||||
class: Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter
|
||||
tags:
|
||||
- { name: request.param_converter, converter: username_feed_token_converter }
|
||||
arguments:
|
||||
- "@doctrine"
|
||||
|
||||
Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber:
|
||||
class: Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber
|
||||
arguments:
|
||||
- "%database_table_prefix%"
|
||||
tags:
|
||||
- { name: doctrine.event_subscriber }
|
||||
|
||||
Graby\Graby:
|
||||
class: Graby\Graby
|
||||
arguments:
|
||||
-
|
||||
error_message: '%wallabag_core.fetching_error_message%'
|
||||
error_message_title: '%wallabag_core.fetching_error_message_title%'
|
||||
- "@wallabag_core.http_client"
|
||||
- '@Graby\SiteConfig\ConfigBuilder'
|
||||
calls:
|
||||
- [ setLogger, [ "@logger" ] ]
|
||||
tags:
|
||||
- { name: monolog.logger, channel: graby }
|
||||
|
||||
Graby\SiteConfig\ConfigBuilder:
|
||||
class: Graby\SiteConfig\ConfigBuilder
|
||||
arguments:
|
||||
- {}
|
||||
- "@logger"
|
||||
|
||||
wallabag_core.http_client:
|
||||
alias: 'httplug.client.wallabag_core'
|
||||
|
||||
Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder:
|
||||
class: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder
|
||||
arguments:
|
||||
- '@Graby\SiteConfig\ConfigBuilder'
|
||||
- "@security.token_storage"
|
||||
- '@Wallabag\CoreBundle\Repository\SiteCredentialRepository'
|
||||
- '@logger'
|
||||
tags:
|
||||
- { name: monolog.logger, channel: graby }
|
||||
|
||||
# service alias override
|
||||
bd_guzzle_site_authenticator.site_config_builder:
|
||||
alias: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder
|
||||
|
||||
Wallabag\CoreBundle\Helper\HttpClientFactory:
|
||||
class: Wallabag\CoreBundle\Helper\HttpClientFactory
|
||||
arguments:
|
||||
- '@Wallabag\CoreBundle\Helper\FileCookieJar'
|
||||
- '@=service(''craue_config'').get(''restricted_access'')'
|
||||
- '@logger'
|
||||
calls:
|
||||
- ["addSubscriber", ["@bd_guzzle_site_authenticator.authenticator_subscriber"]]
|
||||
|
||||
Wallabag\CoreBundle\Helper\FileCookieJar:
|
||||
class: Wallabag\CoreBundle\Helper\FileCookieJar
|
||||
arguments:
|
||||
- "@logger"
|
||||
- "%kernel.cache_dir%/cookiejar.json"
|
||||
|
||||
Wallabag\CoreBundle\Helper\ContentProxy:
|
||||
class: Wallabag\CoreBundle\Helper\ContentProxy
|
||||
arguments:
|
||||
- '@Graby\Graby'
|
||||
- '@Wallabag\CoreBundle\Helper\RuleBasedTagger'
|
||||
- '@Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor'
|
||||
- "@validator"
|
||||
- "@logger"
|
||||
- '%wallabag_core.fetching_error_message%'
|
||||
- '@=service(''craue_config'').get(''store_article_headers'')'
|
||||
|
||||
Wallabag\CoreBundle\Helper\TagsAssigner:
|
||||
class: Wallabag\CoreBundle\Helper\TagsAssigner
|
||||
arguments:
|
||||
- '@Wallabag\CoreBundle\Repository\TagRepository'
|
||||
|
||||
Wallabag\CoreBundle\Helper\RuleBasedTagger:
|
||||
class: Wallabag\CoreBundle\Helper\RuleBasedTagger
|
||||
arguments:
|
||||
- "@rulerz"
|
||||
- '@Wallabag\CoreBundle\Repository\TagRepository'
|
||||
- '@Wallabag\CoreBundle\Repository\EntryRepository'
|
||||
- "@logger"
|
||||
|
||||
Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor:
|
||||
class: Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor
|
||||
arguments:
|
||||
- "@rulerz"
|
||||
- "@logger"
|
||||
- '@Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository'
|
||||
|
||||
# repository as a service
|
||||
Wallabag\CoreBundle\Repository\EntryRepository:
|
||||
class: Wallabag\CoreBundle\Repository\EntryRepository
|
||||
factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
|
||||
arguments:
|
||||
- 'Wallabag\CoreBundle\Entity\Entry'
|
||||
|
||||
Wallabag\CoreBundle\Repository\TagRepository:
|
||||
class: Wallabag\CoreBundle\Repository\TagRepository
|
||||
factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
|
||||
arguments:
|
||||
- 'Wallabag\CoreBundle\Entity\Tag'
|
||||
|
||||
Wallabag\CoreBundle\Repository\SiteCredentialRepository:
|
||||
class: Wallabag\CoreBundle\Repository\SiteCredentialRepository
|
||||
factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
|
||||
arguments:
|
||||
- 'Wallabag\CoreBundle\Entity\SiteCredential'
|
||||
calls:
|
||||
- [ setCrypto, [ '@Wallabag\CoreBundle\Helper\CryptoProxy' ] ]
|
||||
|
||||
Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository:
|
||||
class: Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository
|
||||
factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
|
||||
arguments:
|
||||
- 'Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule'
|
||||
|
||||
Wallabag\CoreBundle\Helper\EntriesExport:
|
||||
class: Wallabag\CoreBundle\Helper\EntriesExport
|
||||
arguments:
|
||||
- "@translator"
|
||||
- '%domain_name%'
|
||||
- web/img/appicon/apple-touch-icon-152.png
|
||||
- "@security.token_storage"
|
||||
|
||||
Wallabag\CoreBundle\Operator\PHP\Matches:
|
||||
class: Wallabag\CoreBundle\Operator\PHP\Matches
|
||||
tags:
|
||||
- { name: rulerz.operator, target: native, operator: matches }
|
||||
|
||||
Wallabag\CoreBundle\Operator\Doctrine\Matches:
|
||||
class: Wallabag\CoreBundle\Operator\Doctrine\Matches
|
||||
tags:
|
||||
- { name: rulerz.operator, target: doctrine, operator: matches, inline: true }
|
||||
|
||||
Wallabag\CoreBundle\Operator\PHP\NotMatches:
|
||||
class: Wallabag\CoreBundle\Operator\PHP\NotMatches
|
||||
tags:
|
||||
- { name: rulerz.operator, target: native, operator: notmatches }
|
||||
|
||||
Wallabag\CoreBundle\Operator\Doctrine\NotMatches:
|
||||
class: Wallabag\CoreBundle\Operator\Doctrine\NotMatches
|
||||
tags:
|
||||
- { name: rulerz.operator, target: doctrine, operator: notmatches, inline: true }
|
||||
|
||||
Wallabag\CoreBundle\Operator\PHP\PatternMatches:
|
||||
class: Wallabag\CoreBundle\Operator\PHP\PatternMatches
|
||||
tags:
|
||||
- { name: rulerz.operator, target: native, operator: "~" }
|
||||
|
||||
Wallabag\CoreBundle\Helper\Redirect:
|
||||
class: Wallabag\CoreBundle\Helper\Redirect
|
||||
arguments:
|
||||
- "@router"
|
||||
- "@security.token_storage"
|
||||
|
||||
Wallabag\CoreBundle\Helper\PreparePagerForEntries:
|
||||
class: Wallabag\CoreBundle\Helper\PreparePagerForEntries
|
||||
arguments:
|
||||
- "@security.token_storage"
|
||||
- "@router"
|
||||
|
||||
Predis\Client:
|
||||
class: Predis\Client
|
||||
arguments:
|
||||
-
|
||||
scheme: '%redis_scheme%'
|
||||
host: '%redis_host%'
|
||||
port: '%redis_port%'
|
||||
path: '%redis_path%'
|
||||
password: '%redis_password%'
|
||||
|
||||
Wallabag\CoreBundle\Controller\ExceptionController:
|
||||
class: Wallabag\CoreBundle\Controller\ExceptionController
|
||||
public: true
|
||||
arguments:
|
||||
- '@twig'
|
||||
- '%kernel.debug%'
|
||||
|
||||
Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber:
|
||||
class: Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber
|
||||
arguments:
|
||||
- "@doctrine"
|
||||
tags:
|
||||
- { name: doctrine.event_subscriber }
|
||||
|
||||
Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber:
|
||||
class: Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber
|
||||
arguments:
|
||||
- "@doctrine.orm.default_entity_manager"
|
||||
- '@Wallabag\CoreBundle\Helper\DownloadImages'
|
||||
- '@=service(''craue_config'').get(''download_images_enabled'')'
|
||||
- "@logger"
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
Wallabag\CoreBundle\Helper\DownloadImages:
|
||||
class: Wallabag\CoreBundle\Helper\DownloadImages
|
||||
arguments:
|
||||
- "@wallabag_core.entry.download_images.client"
|
||||
- "%kernel.project_dir%/web/assets/images"
|
||||
- '%domain_name%'
|
||||
- "@logger"
|
||||
|
||||
wallabag_core.entry.download_images.client:
|
||||
alias: 'httplug.client.wallabag_core.entry.download_images'
|
||||
|
||||
Wallabag\CoreBundle\Helper\CryptoProxy:
|
||||
class: Wallabag\CoreBundle\Helper\CryptoProxy
|
||||
arguments:
|
||||
- "%wallabag_core.site_credentials.encryption_key_path%"
|
||||
- "@logger"
|
||||
|
||||
Wallabag\CoreBundle\Command\:
|
||||
resource: ../../Command/*
|
||||
autoconfigure: true
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Consumer;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\NullLogger;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
|
@ -20,7 +20,7 @@ abstract class AbstractConsumer
|
|||
protected $eventDispatcher;
|
||||
protected $logger;
|
||||
|
||||
public function __construct(EntityManager $em, UserRepository $userRepository, AbstractImport $import, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger = null)
|
||||
public function __construct(EntityManagerInterface $em, UserRepository $userRepository, AbstractImport $import, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger = null)
|
||||
{
|
||||
$this->em = $em;
|
||||
$this->userRepository = $userRepository;
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Loader;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
|
||||
class WallabagImportExtension extends Extension
|
||||
|
@ -15,9 +13,6 @@ class WallabagImportExtension extends Extension
|
|||
$config = $this->processConfiguration($configuration, $configs);
|
||||
$container->setParameter('wallabag_import.allow_mimetypes', $config['allow_mimetypes']);
|
||||
$container->setParameter('wallabag_import.resource_dir', $config['resource_dir']);
|
||||
|
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
|
||||
$loader->load('services.yml');
|
||||
}
|
||||
|
||||
public function getAlias()
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Import;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use OldSound\RabbitMqBundle\RabbitMq\ProducerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\NullLogger;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\CoreBundle\Entity\Tag;
|
||||
|
@ -29,10 +28,10 @@ abstract class AbstractImport implements ImportInterface
|
|||
protected $importedEntries = 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, LoggerInterface $logger)
|
||||
{
|
||||
$this->em = $em;
|
||||
$this->logger = new NullLogger();
|
||||
$this->logger = $logger;
|
||||
$this->contentProxy = $contentProxy;
|
||||
$this->tagsAssigner = $tagsAssigner;
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
|
|
|
@ -2,17 +2,23 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Import;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||
use Wallabag\CoreBundle\Helper\TagsAssigner;
|
||||
|
||||
class WallabagV1Import extends WallabagImport
|
||||
{
|
||||
protected $fetchingErrorMessage;
|
||||
protected $fetchingErrorMessageTitle;
|
||||
|
||||
public function __construct($em, $contentProxy, $tagsAssigner, $eventDispatcher, $fetchingErrorMessageTitle, $fetchingErrorMessage)
|
||||
public function __construct(EntityManagerInterface $em, ContentProxy $contentProxy, TagsAssigner $tagsAssigner, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger, $fetchingErrorMessageTitle, $fetchingErrorMessage)
|
||||
{
|
||||
$this->fetchingErrorMessageTitle = $fetchingErrorMessageTitle;
|
||||
$this->fetchingErrorMessage = $fetchingErrorMessage;
|
||||
|
||||
parent::__construct($em, $contentProxy, $tagsAssigner, $eventDispatcher);
|
||||
parent::__construct($em, $contentProxy, $tagsAssigner, $eventDispatcher, $logger);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
# RabbitMQ stuff
|
||||
services:
|
||||
wallabag_import.consumer.amqp.pocket:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\PocketImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
wallabag_import.consumer.amqp.readability:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\ReadabilityImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
wallabag_import.consumer.amqp.instapaper:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\InstapaperImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
wallabag_import.consumer.amqp.pinboard:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\PinboardImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
wallabag_import.consumer.amqp.delicious:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\DeliciousImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
wallabag_import.consumer.amqp.wallabag_v1:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\WallabagV1Import'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
wallabag_import.consumer.amqp.wallabag_v2:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\WallabagV2Import'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
wallabag_import.consumer.amqp.elcurator:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\ElcuratorImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
wallabag_import.consumer.amqp.firefox:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\FirefoxImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
||||
wallabag_import.consumer.amqp.chrome:
|
||||
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\UserBundle\Repository\UserRepository'
|
||||
- '@Wallabag\ImportBundle\Import\ChromeImport'
|
||||
- "@event_dispatcher"
|
||||
- "@logger"
|
|
@ -1,137 +0,0 @@
|
|||
imports:
|
||||
- { resource: rabbit.yml }
|
||||
- { resource: redis.yml }
|
||||
|
||||
services:
|
||||
Wallabag\ImportBundle\Import\ImportChain:
|
||||
class: Wallabag\ImportBundle\Import\ImportChain
|
||||
|
||||
wallabag_import.pocket.client:
|
||||
alias: 'httplug.client.wallabag_import.pocket.client'
|
||||
|
||||
Wallabag\ImportBundle\Import\PocketImport:
|
||||
class: Wallabag\ImportBundle\Import\PocketImport
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\CoreBundle\Helper\ContentProxy'
|
||||
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
|
||||
- "@event_dispatcher"
|
||||
calls:
|
||||
- [ setClient, [ "@wallabag_import.pocket.client" ] ]
|
||||
- [ setLogger, [ "@logger" ]]
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: pocket }
|
||||
|
||||
Wallabag\ImportBundle\Import\WallabagV1Import:
|
||||
class: Wallabag\ImportBundle\Import\WallabagV1Import
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\CoreBundle\Helper\ContentProxy'
|
||||
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
|
||||
- "@event_dispatcher"
|
||||
- "%wallabag_core.fetching_error_message_title%"
|
||||
- "%wallabag_core.fetching_error_message%"
|
||||
calls:
|
||||
- [ setLogger, [ "@logger" ]]
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: wallabag_v1 }
|
||||
|
||||
Wallabag\ImportBundle\Import\WallabagV2Import:
|
||||
class: Wallabag\ImportBundle\Import\WallabagV2Import
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\CoreBundle\Helper\ContentProxy'
|
||||
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
|
||||
- "@event_dispatcher"
|
||||
calls:
|
||||
- [ setLogger, [ "@logger" ]]
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: wallabag_v2 }
|
||||
|
||||
Wallabag\ImportBundle\Import\ElcuratorImport:
|
||||
class: Wallabag\ImportBundle\Import\ElcuratorImport
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\CoreBundle\Helper\ContentProxy'
|
||||
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
|
||||
- "@event_dispatcher"
|
||||
calls:
|
||||
- [ setLogger, [ "@logger" ]]
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: elcurator }
|
||||
|
||||
Wallabag\ImportBundle\Import\ReadabilityImport:
|
||||
class: Wallabag\ImportBundle\Import\ReadabilityImport
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\CoreBundle\Helper\ContentProxy'
|
||||
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
|
||||
- "@event_dispatcher"
|
||||
calls:
|
||||
- [ setLogger, [ "@logger" ]]
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: readability }
|
||||
|
||||
Wallabag\ImportBundle\Import\InstapaperImport:
|
||||
class: Wallabag\ImportBundle\Import\InstapaperImport
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\CoreBundle\Helper\ContentProxy'
|
||||
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
|
||||
- "@event_dispatcher"
|
||||
calls:
|
||||
- [ setLogger, [ "@logger" ]]
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: instapaper }
|
||||
|
||||
Wallabag\ImportBundle\Import\PinboardImport:
|
||||
class: Wallabag\ImportBundle\Import\PinboardImport
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\CoreBundle\Helper\ContentProxy'
|
||||
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
|
||||
- "@event_dispatcher"
|
||||
calls:
|
||||
- [ setLogger, [ "@logger" ]]
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: pinboard }
|
||||
|
||||
Wallabag\ImportBundle\Import\DeliciousImport:
|
||||
class: Wallabag\ImportBundle\Import\DeliciousImport
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\CoreBundle\Helper\ContentProxy'
|
||||
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
|
||||
- "@event_dispatcher"
|
||||
calls:
|
||||
- [ setLogger, [ "@logger" ]]
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: delicious }
|
||||
|
||||
Wallabag\ImportBundle\Import\FirefoxImport:
|
||||
class: Wallabag\ImportBundle\Import\FirefoxImport
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\CoreBundle\Helper\ContentProxy'
|
||||
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
|
||||
- "@event_dispatcher"
|
||||
calls:
|
||||
- [ setLogger, [ "@logger" ]]
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: firefox }
|
||||
|
||||
Wallabag\ImportBundle\Import\ChromeImport:
|
||||
class: Wallabag\ImportBundle\Import\ChromeImport
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- '@Wallabag\CoreBundle\Helper\ContentProxy'
|
||||
- '@Wallabag\CoreBundle\Helper\TagsAssigner'
|
||||
- "@event_dispatcher"
|
||||
calls:
|
||||
- [ setLogger, [ "@logger" ]]
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: chrome }
|
||||
|
||||
Wallabag\ImportBundle\Command\:
|
||||
resource: ../../Command/*
|
||||
autoconfigure: true
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
namespace Wallabag\UserBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Loader;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
|
||||
class WallabagUserExtension extends Extension
|
||||
|
@ -13,9 +11,6 @@ class WallabagUserExtension extends Extension
|
|||
{
|
||||
$configuration = new Configuration();
|
||||
$config = $this->processConfiguration($configuration, $configs);
|
||||
|
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
|
||||
$loader->load('services.yml');
|
||||
}
|
||||
|
||||
public function getAlias()
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Wallabag\UserBundle\EventListener;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use FOS\UserBundle\Event\UserEvent;
|
||||
use FOS\UserBundle\FOSUserEvents;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
@ -25,7 +25,7 @@ class CreateConfigListener implements EventSubscriberInterface
|
|||
private $listMode;
|
||||
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->theme = $theme;
|
||||
|
|
|
@ -2,12 +2,18 @@
|
|||
|
||||
namespace Wallabag\UserBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class UserRepository extends EntityRepository
|
||||
class UserRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a user by its username and Feed token.
|
||||
*
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
services:
|
||||
Wallabag\UserBundle\Mailer\AuthCodeMailer:
|
||||
class: Wallabag\UserBundle\Mailer\AuthCodeMailer
|
||||
arguments:
|
||||
- "@mailer"
|
||||
- "@twig"
|
||||
- "%scheb_two_factor.email.sender_email%"
|
||||
- "%scheb_two_factor.email.sender_name%"
|
||||
- '@=service(''craue_config'').get(''wallabag_support_url'')'
|
||||
- '%domain_name%'
|
||||
|
||||
Wallabag\UserBundle\EventListener\RegistrationListener:
|
||||
arguments:
|
||||
- '%fosuser_registration%'
|
||||
- '@router'
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
Wallabag\UserBundle\EventListener\PasswordResettingListener:
|
||||
class: Wallabag\UserBundle\EventListener\PasswordResettingListener
|
||||
arguments:
|
||||
- "@router"
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
Wallabag\UserBundle\Repository\UserRepository:
|
||||
class: Wallabag\UserBundle\Repository\UserRepository
|
||||
factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
|
||||
arguments:
|
||||
- 'Wallabag\UserBundle\Entity\User'
|
||||
|
||||
Wallabag\UserBundle\EventListener\CreateConfigListener:
|
||||
class: Wallabag\UserBundle\EventListener\CreateConfigListener
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- "%wallabag_core.theme%"
|
||||
- "%wallabag_core.items_on_page%"
|
||||
- "%wallabag_core.feed_limit%"
|
||||
- "%wallabag_core.language%"
|
||||
- "%wallabag_core.reading_speed%"
|
||||
- "%wallabag_core.action_mark_as_read%"
|
||||
- "%wallabag_core.list_mode%"
|
||||
- "@session"
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
Wallabag\UserBundle\EventListener\AuthenticationFailureListener:
|
||||
class: Wallabag\UserBundle\EventListener\AuthenticationFailureListener
|
||||
arguments:
|
||||
- "@request_stack"
|
||||
- "@logger"
|
||||
tags:
|
||||
- { name: kernel.event_listener, event: security.authentication.failure, method: onAuthenticationFailure }
|
|
@ -232,11 +232,10 @@ class ChromeImportTest extends TestCase
|
|||
->expects($this->exactly($dispatched))
|
||||
->method('dispatch');
|
||||
|
||||
$wallabag = new ChromeImport($this->em, $this->contentProxy, $this->tagsAssigner, $dispatcher);
|
||||
|
||||
$this->logHandler = new TestHandler();
|
||||
$logger = new Logger('test', [$this->logHandler]);
|
||||
$wallabag->setLogger($logger);
|
||||
|
||||
$wallabag = new ChromeImport($this->em, $this->contentProxy, $this->tagsAssigner, $dispatcher, $logger);
|
||||
|
||||
if (false === $unsetUser) {
|
||||
$wallabag->setUser($this->user);
|
||||
|
|
|
@ -232,11 +232,10 @@ class FirefoxImportTest extends TestCase
|
|||
->expects($this->exactly($dispatched))
|
||||
->method('dispatch');
|
||||
|
||||
$wallabag = new FirefoxImport($this->em, $this->contentProxy, $this->tagsAssigner, $dispatcher);
|
||||
|
||||
$this->logHandler = new TestHandler();
|
||||
$logger = new Logger('test', [$this->logHandler]);
|
||||
$wallabag->setLogger($logger);
|
||||
|
||||
$wallabag = new FirefoxImport($this->em, $this->contentProxy, $this->tagsAssigner, $dispatcher, $logger);
|
||||
|
||||
if (false === $unsetUser) {
|
||||
$wallabag->setUser($this->user);
|
||||
|
|
|
@ -247,11 +247,10 @@ class InstapaperImportTest extends TestCase
|
|||
->expects($this->exactly($dispatched))
|
||||
->method('dispatch');
|
||||
|
||||
$import = new InstapaperImport($this->em, $this->contentProxy, $this->tagsAssigner, $dispatcher);
|
||||
|
||||
$this->logHandler = new TestHandler();
|
||||
$logger = new Logger('test', [$this->logHandler]);
|
||||
$import->setLogger($logger);
|
||||
|
||||
$import = new InstapaperImport($this->em, $this->contentProxy, $this->tagsAssigner, $dispatcher, $logger);
|
||||
|
||||
if (false === $unsetUser) {
|
||||
$import->setUser($this->user);
|
||||
|
|
|
@ -589,12 +589,11 @@ JSON
|
|||
->expects($this->exactly($dispatched))
|
||||
->method('dispatch');
|
||||
|
||||
$pocket = new PocketImport($this->em, $this->contentProxy, $this->tagsAssigner, $dispatcher);
|
||||
$pocket->setUser($this->user);
|
||||
|
||||
$this->logHandler = new TestHandler();
|
||||
$logger = new Logger('test', [$this->logHandler]);
|
||||
$pocket->setLogger($logger);
|
||||
|
||||
$pocket = new PocketImport($this->em, $this->contentProxy, $this->tagsAssigner, $dispatcher, $logger);
|
||||
$pocket->setUser($this->user);
|
||||
|
||||
return $pocket;
|
||||
}
|
||||
|
|
|
@ -232,11 +232,10 @@ class ReadabilityImportTest extends TestCase
|
|||
->expects($this->exactly($dispatched))
|
||||
->method('dispatch');
|
||||
|
||||
$wallabag = new ReadabilityImport($this->em, $this->contentProxy, $this->tagsAssigner, $dispatcher);
|
||||
|
||||
$this->logHandler = new TestHandler();
|
||||
$logger = new Logger('test', [$this->logHandler]);
|
||||
$wallabag->setLogger($logger);
|
||||
|
||||
$wallabag = new ReadabilityImport($this->em, $this->contentProxy, $this->tagsAssigner, $dispatcher, $logger);
|
||||
|
||||
if (false === $unsetUser) {
|
||||
$wallabag->setUser($this->user);
|
||||
|
|
|
@ -249,19 +249,19 @@ class WallabagV1ImportTest extends TestCase
|
|||
->expects($this->exactly($dispatched))
|
||||
->method('dispatch');
|
||||
|
||||
$this->logHandler = new TestHandler();
|
||||
$logger = new Logger('test', [$this->logHandler]);
|
||||
|
||||
$wallabag = new WallabagV1Import(
|
||||
$this->em,
|
||||
$this->contentProxy,
|
||||
$this->tagsAssigner,
|
||||
$dispatcher,
|
||||
$logger,
|
||||
$this->fetchingErrorMessageTitle,
|
||||
$this->fetchingErrorMessage
|
||||
);
|
||||
|
||||
$this->logHandler = new TestHandler();
|
||||
$logger = new Logger('test', [$this->logHandler]);
|
||||
$wallabag->setLogger($logger);
|
||||
|
||||
if (false === $unsetUser) {
|
||||
$wallabag->setUser($this->user);
|
||||
}
|
||||
|
|
|
@ -275,11 +275,10 @@ class WallabagV2ImportTest extends TestCase
|
|||
->expects($this->exactly($dispatched))
|
||||
->method('dispatch');
|
||||
|
||||
$wallabag = new WallabagV2Import($this->em, $this->contentProxy, $this->tagsAssigner, $dispatcher);
|
||||
|
||||
$this->logHandler = new TestHandler();
|
||||
$logger = new Logger('test', [$this->logHandler]);
|
||||
$wallabag->setLogger($logger);
|
||||
|
||||
$wallabag = new WallabagV2Import($this->em, $this->contentProxy, $this->tagsAssigner, $dispatcher, $logger);
|
||||
|
||||
if (false === $unsetUser) {
|
||||
$wallabag->setUser($this->user);
|
||||
|
|
Loading…
Reference in a new issue