aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2017-05-28 21:50:23 +0200
committerGitHub <noreply@github.com>2017-05-28 21:50:23 +0200
commitb788add08787863ac2a0e68ddaf4620da4b2b33c (patch)
tree520242e7454abd9e4562d250a5be46496d41b9a6 /src/Wallabag
parent35941d57ee4d06ec3557d4b126d5f6fd263bcf3a (diff)
parentde8d2a9005321a935e52f4471f031f73bb240412 (diff)
downloadwallabag-b788add08787863ac2a0e68ddaf4620da4b2b33c.tar.gz
wallabag-b788add08787863ac2a0e68ddaf4620da4b2b33c.tar.zst
wallabag-b788add08787863ac2a0e68ddaf4620da4b2b33c.zip
Merge pull request #3153 from wallabag/content-proxy-refactor
Move Tags assigner to a separate file
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/ApiBundle/Controller/EntryRestController.php8
-rw-r--r--src/Wallabag/CoreBundle/Controller/TagController.php2
-rw-r--r--src/Wallabag/CoreBundle/Helper/ContentProxy.php55
-rw-r--r--src/Wallabag/CoreBundle/Helper/TagsAssigner.php75
-rw-r--r--src/Wallabag/CoreBundle/Resources/config/services.yml6
-rw-r--r--src/Wallabag/ImportBundle/Import/AbstractImport.php5
-rw-r--r--src/Wallabag/ImportBundle/Import/BrowserImport.php3
-rw-r--r--src/Wallabag/ImportBundle/Import/PinboardImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/PocketImport.php3
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Resources/config/services.yml8
11 files changed, 103 insertions, 66 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
index 4801811d..31bb67fd 100644
--- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
@@ -318,7 +318,7 @@ class EntryRestController extends WallabagRestController
318 318
319 $tags = $request->request->get('tags', ''); 319 $tags = $request->request->get('tags', '');
320 if (!empty($tags)) { 320 if (!empty($tags)) {
321 $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags); 321 $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $tags);
322 } 322 }
323 323
324 if (!is_null($isStarred)) { 324 if (!is_null($isStarred)) {
@@ -379,7 +379,7 @@ class EntryRestController extends WallabagRestController
379 379
380 $tags = $request->request->get('tags', ''); 380 $tags = $request->request->get('tags', '');
381 if (!empty($tags)) { 381 if (!empty($tags)) {
382 $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags); 382 $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $tags);
383 } 383 }
384 384
385 $em = $this->getDoctrine()->getManager(); 385 $em = $this->getDoctrine()->getManager();
@@ -497,7 +497,7 @@ class EntryRestController extends WallabagRestController
497 497
498 $tags = $request->request->get('tags', ''); 498 $tags = $request->request->get('tags', '');
499 if (!empty($tags)) { 499 if (!empty($tags)) {
500 $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags); 500 $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $tags);
501 } 501 }
502 502
503 $em = $this->getDoctrine()->getManager(); 503 $em = $this->getDoctrine()->getManager();
@@ -626,7 +626,7 @@ class EntryRestController extends WallabagRestController
626 $tags = $element->tags; 626 $tags = $element->tags;
627 627
628 if (false !== $entry && !(empty($tags))) { 628 if (false !== $entry && !(empty($tags))) {
629 $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags); 629 $this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $tags);
630 630
631 $em = $this->getDoctrine()->getManager(); 631 $em = $this->getDoctrine()->getManager();
632 $em->persist($entry); 632 $em->persist($entry);
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php
index 8a093289..fb6a720b 100644
--- a/src/Wallabag/CoreBundle/Controller/TagController.php
+++ b/src/Wallabag/CoreBundle/Controller/TagController.php
@@ -28,7 +28,7 @@ class TagController extends Controller
28 $form->handleRequest($request); 28 $form->handleRequest($request);
29 29
30 if ($form->isSubmitted() && $form->isValid()) { 30 if ($form->isSubmitted() && $form->isValid()) {
31 $this->get('wallabag_core.content_proxy')->assignTagsToEntry( 31 $this->get('wallabag_core.tags_assigner')->assignTagsToEntry(
32 $entry, 32 $entry,
33 $form->get('label')->getData() 33 $form->get('label')->getData()
34 ); 34 );
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
index 9a08db3d..4b3e6fbb 100644
--- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php
+++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
@@ -5,9 +5,7 @@ namespace Wallabag\CoreBundle\Helper;
5use Graby\Graby; 5use Graby\Graby;
6use Psr\Log\LoggerInterface; 6use Psr\Log\LoggerInterface;
7use Wallabag\CoreBundle\Entity\Entry; 7use Wallabag\CoreBundle\Entity\Entry;
8use Wallabag\CoreBundle\Entity\Tag;
9use Wallabag\CoreBundle\Tools\Utils; 8use Wallabag\CoreBundle\Tools\Utils;
10use Wallabag\CoreBundle\Repository\TagRepository;
11use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeExtensionGuesser; 9use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeExtensionGuesser;
12 10
13/** 11/**
@@ -19,16 +17,15 @@ class ContentProxy
19 protected $graby; 17 protected $graby;
20 protected $tagger; 18 protected $tagger;
21 protected $logger; 19 protected $logger;
22 protected $tagRepository;
23 protected $mimeGuesser; 20 protected $mimeGuesser;
24 protected $fetchingErrorMessage; 21 protected $fetchingErrorMessage;
22 protected $eventDispatcher;
25 23
26 public function __construct(Graby $graby, RuleBasedTagger $tagger, TagRepository $tagRepository, LoggerInterface $logger, $fetchingErrorMessage) 24 public function __construct(Graby $graby, RuleBasedTagger $tagger, LoggerInterface $logger, $fetchingErrorMessage)
27 { 25 {
28 $this->graby = $graby; 26 $this->graby = $graby;
29 $this->tagger = $tagger; 27 $this->tagger = $tagger;
30 $this->logger = $logger; 28 $this->logger = $logger;
31 $this->tagRepository = $tagRepository;
32 $this->mimeGuesser = new MimeTypeExtensionGuesser(); 29 $this->mimeGuesser = new MimeTypeExtensionGuesser();
33 $this->fetchingErrorMessage = $fetchingErrorMessage; 30 $this->fetchingErrorMessage = $fetchingErrorMessage;
34 } 31 }
@@ -122,54 +119,6 @@ class ContentProxy
122 } 119 }
123 120
124 /** 121 /**
125 * Assign some tags to an entry.
126 *
127 * @param Entry $entry
128 * @param array|string $tags An array of tag or a string coma separated of tag
129 * @param array $entitiesReady Entities from the EntityManager which are persisted but not yet flushed
130 * It is mostly to fix duplicate tag on import @see http://stackoverflow.com/a/7879164/569101
131 */
132 public function assignTagsToEntry(Entry $entry, $tags, array $entitiesReady = [])
133 {
134 if (!is_array($tags)) {
135 $tags = explode(',', $tags);
136 }
137
138 // keeps only Tag entity from the "not yet flushed entities"
139 $tagsNotYetFlushed = [];
140 foreach ($entitiesReady as $entity) {
141 if ($entity instanceof Tag) {
142 $tagsNotYetFlushed[$entity->getLabel()] = $entity;
143 }
144 }
145
146 foreach ($tags as $label) {
147 $label = trim($label);
148
149 // avoid empty tag
150 if (0 === strlen($label)) {
151 continue;
152 }
153
154 if (isset($tagsNotYetFlushed[$label])) {
155 $tagEntity = $tagsNotYetFlushed[$label];
156 } else {
157 $tagEntity = $this->tagRepository->findOneByLabel($label);
158
159 if (is_null($tagEntity)) {
160 $tagEntity = new Tag();
161 $tagEntity->setLabel($label);
162 }
163 }
164
165 // only add the tag on the entry if the relation doesn't exist
166 if (false === $entry->getTags()->contains($tagEntity)) {
167 $entry->addTag($tagEntity);
168 }
169 }
170 }
171
172 /**
173 * Validate that the given content as enough value to be used 122 * Validate that the given content as enough value to be used
174 * instead of fetch the content from the url. 123 * instead of fetch the content from the url.
175 * 124 *
diff --git a/src/Wallabag/CoreBundle/Helper/TagsAssigner.php b/src/Wallabag/CoreBundle/Helper/TagsAssigner.php
new file mode 100644
index 00000000..a2fb0b9a
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Helper/TagsAssigner.php
@@ -0,0 +1,75 @@
1<?php
2
3namespace Wallabag\CoreBundle\Helper;
4
5use Wallabag\CoreBundle\Entity\Entry;
6use Wallabag\CoreBundle\Entity\Tag;
7use Wallabag\CoreBundle\Repository\TagRepository;
8
9class TagsAssigner
10{
11 /**
12 * @var TagRepository
13 */
14 protected $tagRepository;
15
16 public function __construct(TagRepository $tagRepository)
17 {
18 $this->tagRepository = $tagRepository;
19 }
20
21 /**
22 * Assign some tags to an entry.
23 *
24 * @param Entry $entry
25 * @param array|string $tags An array of tag or a string coma separated of tag
26 * @param array $entitiesReady Entities from the EntityManager which are persisted but not yet flushed
27 * It is mostly to fix duplicate tag on import @see http://stackoverflow.com/a/7879164/569101
28 *
29 * @return Tag[]
30 */
31 public function assignTagsToEntry(Entry $entry, $tags, array $entitiesReady = [])
32 {
33 $tagsEntities = [];
34
35 if (!is_array($tags)) {
36 $tags = explode(',', $tags);
37 }
38
39 // keeps only Tag entity from the "not yet flushed entities"
40 $tagsNotYetFlushed = [];
41 foreach ($entitiesReady as $entity) {
42 if ($entity instanceof Tag) {
43 $tagsNotYetFlushed[$entity->getLabel()] = $entity;
44 }
45 }
46
47 foreach ($tags as $label) {
48 $label = trim($label);
49
50 // avoid empty tag
51 if (0 === strlen($label)) {
52 continue;
53 }
54
55 if (isset($tagsNotYetFlushed[$label])) {
56 $tagEntity = $tagsNotYetFlushed[$label];
57 } else {
58 $tagEntity = $this->tagRepository->findOneByLabel($label);
59
60 if (null === $tagEntity) {
61 $tagEntity = new Tag();
62 $tagEntity->setLabel($label);
63 }
64 }
65
66 // only add the tag on the entry if the relation doesn't exist
67 if (false === $entry->getTags()->contains($tagEntity)) {
68 $entry->addTag($tagEntity);
69 $tagsEntities[] = $tagEntity;
70 }
71 }
72
73 return $tagsEntities;
74 }
75}
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml
index a9134ac3..a68b2fdc 100644
--- a/src/Wallabag/CoreBundle/Resources/config/services.yml
+++ b/src/Wallabag/CoreBundle/Resources/config/services.yml
@@ -89,10 +89,14 @@ services:
89 arguments: 89 arguments:
90 - "@wallabag_core.graby" 90 - "@wallabag_core.graby"
91 - "@wallabag_core.rule_based_tagger" 91 - "@wallabag_core.rule_based_tagger"
92 - "@wallabag_core.tag_repository"
93 - "@logger" 92 - "@logger"
94 - '%wallabag_core.fetching_error_message%' 93 - '%wallabag_core.fetching_error_message%'
95 94
95 wallabag_core.tags_assigner:
96 class: Wallabag\CoreBundle\Helper\TagsAssigner
97 arguments:
98 - "@wallabag_core.tag_repository"
99
96 wallabag_core.rule_based_tagger: 100 wallabag_core.rule_based_tagger:
97 class: Wallabag\CoreBundle\Helper\RuleBasedTagger 101 class: Wallabag\CoreBundle\Helper\RuleBasedTagger
98 arguments: 102 arguments:
diff --git a/src/Wallabag/ImportBundle/Import/AbstractImport.php b/src/Wallabag/ImportBundle/Import/AbstractImport.php
index 1d4a6e27..a61388c0 100644
--- a/src/Wallabag/ImportBundle/Import/AbstractImport.php
+++ b/src/Wallabag/ImportBundle/Import/AbstractImport.php
@@ -8,6 +8,7 @@ use Doctrine\ORM\EntityManager;
8use Wallabag\CoreBundle\Helper\ContentProxy; 8use Wallabag\CoreBundle\Helper\ContentProxy;
9use Wallabag\CoreBundle\Entity\Entry; 9use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\CoreBundle\Entity\Tag; 10use Wallabag\CoreBundle\Entity\Tag;
11use Wallabag\CoreBundle\Helper\TagsAssigner;
11use Wallabag\UserBundle\Entity\User; 12use Wallabag\UserBundle\Entity\User;
12use OldSound\RabbitMqBundle\RabbitMq\ProducerInterface; 13use OldSound\RabbitMqBundle\RabbitMq\ProducerInterface;
13use Symfony\Component\EventDispatcher\EventDispatcherInterface; 14use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -18,6 +19,7 @@ abstract class AbstractImport implements ImportInterface
18 protected $em; 19 protected $em;
19 protected $logger; 20 protected $logger;
20 protected $contentProxy; 21 protected $contentProxy;
22 protected $tagsAssigner;
21 protected $eventDispatcher; 23 protected $eventDispatcher;
22 protected $producer; 24 protected $producer;
23 protected $user; 25 protected $user;
@@ -26,11 +28,12 @@ abstract class AbstractImport implements ImportInterface
26 protected $importedEntries = 0; 28 protected $importedEntries = 0;
27 protected $queuedEntries = 0; 29 protected $queuedEntries = 0;
28 30
29 public function __construct(EntityManager $em, ContentProxy $contentProxy, EventDispatcherInterface $eventDispatcher) 31 public function __construct(EntityManager $em, ContentProxy $contentProxy, TagsAssigner $tagsAssigner, EventDispatcherInterface $eventDispatcher)
30 { 32 {
31 $this->em = $em; 33 $this->em = $em;
32 $this->logger = new NullLogger(); 34 $this->logger = new NullLogger();
33 $this->contentProxy = $contentProxy; 35 $this->contentProxy = $contentProxy;
36 $this->tagsAssigner = $tagsAssigner;
34 $this->eventDispatcher = $eventDispatcher; 37 $this->eventDispatcher = $eventDispatcher;
35 } 38 }
36 39
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php
index 8bf7d92e..ef0eeb7e 100644
--- a/src/Wallabag/ImportBundle/Import/BrowserImport.php
+++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php
@@ -4,7 +4,6 @@ namespace Wallabag\ImportBundle\Import;
4 4
5use Wallabag\CoreBundle\Entity\Entry; 5use Wallabag\CoreBundle\Entity\Entry;
6use Wallabag\UserBundle\Entity\User; 6use Wallabag\UserBundle\Entity\User;
7use Wallabag\CoreBundle\Helper\ContentProxy;
8use Wallabag\CoreBundle\Event\EntrySavedEvent; 7use Wallabag\CoreBundle\Event\EntrySavedEvent;
9 8
10abstract class BrowserImport extends AbstractImport 9abstract class BrowserImport extends AbstractImport
@@ -205,7 +204,7 @@ abstract class BrowserImport extends AbstractImport
205 $entry = $this->fetchContent($entry, $data['url'], $data); 204 $entry = $this->fetchContent($entry, $data['url'], $data);
206 205
207 if (array_key_exists('tags', $data)) { 206 if (array_key_exists('tags', $data)) {
208 $this->contentProxy->assignTagsToEntry( 207 $this->tagsAssigner->assignTagsToEntry(
209 $entry, 208 $entry,
210 $data['tags'] 209 $data['tags']
211 ); 210 );
diff --git a/src/Wallabag/ImportBundle/Import/PinboardImport.php b/src/Wallabag/ImportBundle/Import/PinboardImport.php
index d9865534..489b9257 100644
--- a/src/Wallabag/ImportBundle/Import/PinboardImport.php
+++ b/src/Wallabag/ImportBundle/Import/PinboardImport.php
@@ -112,7 +112,7 @@ class PinboardImport extends AbstractImport
112 $entry = $this->fetchContent($entry, $data['url'], $data); 112 $entry = $this->fetchContent($entry, $data['url'], $data);
113 113
114 if (!empty($data['tags'])) { 114 if (!empty($data['tags'])) {
115 $this->contentProxy->assignTagsToEntry( 115 $this->tagsAssigner->assignTagsToEntry(
116 $entry, 116 $entry,
117 $data['tags'], 117 $data['tags'],
118 $this->em->getUnitOfWork()->getScheduledEntityInsertions() 118 $this->em->getUnitOfWork()->getScheduledEntityInsertions()
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php
index 33093480..8835161b 100644
--- a/src/Wallabag/ImportBundle/Import/PocketImport.php
+++ b/src/Wallabag/ImportBundle/Import/PocketImport.php
@@ -5,7 +5,6 @@ namespace Wallabag\ImportBundle\Import;
5use GuzzleHttp\Client; 5use GuzzleHttp\Client;
6use GuzzleHttp\Exception\RequestException; 6use GuzzleHttp\Exception\RequestException;
7use Wallabag\CoreBundle\Entity\Entry; 7use Wallabag\CoreBundle\Entity\Entry;
8use Wallabag\CoreBundle\Helper\ContentProxy;
9 8
10class PocketImport extends AbstractImport 9class PocketImport extends AbstractImport
11{ 10{
@@ -216,7 +215,7 @@ class PocketImport extends AbstractImport
216 } 215 }
217 216
218 if (isset($importedEntry['tags']) && !empty($importedEntry['tags'])) { 217 if (isset($importedEntry['tags']) && !empty($importedEntry['tags'])) {
219 $this->contentProxy->assignTagsToEntry( 218 $this->tagsAssigner->assignTagsToEntry(
220 $entry, 219 $entry,
221 array_keys($importedEntry['tags']), 220 array_keys($importedEntry['tags']),
222 $this->em->getUnitOfWork()->getScheduledEntityInsertions() 221 $this->em->getUnitOfWork()->getScheduledEntityInsertions()
diff --git a/src/Wallabag/ImportBundle/Import/WallabagImport.php b/src/Wallabag/ImportBundle/Import/WallabagImport.php
index 702da057..0e5382cf 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagImport.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagImport.php
@@ -111,7 +111,7 @@ abstract class WallabagImport extends AbstractImport
111 $entry = $this->fetchContent($entry, $data['url'], $data); 111 $entry = $this->fetchContent($entry, $data['url'], $data);
112 112
113 if (array_key_exists('tags', $data)) { 113 if (array_key_exists('tags', $data)) {
114 $this->contentProxy->assignTagsToEntry( 114 $this->tagsAssigner->assignTagsToEntry(
115 $entry, 115 $entry,
116 $data['tags'], 116 $data['tags'],
117 $this->em->getUnitOfWork()->getScheduledEntityInsertions() 117 $this->em->getUnitOfWork()->getScheduledEntityInsertions()
diff --git a/src/Wallabag/ImportBundle/Resources/config/services.yml b/src/Wallabag/ImportBundle/Resources/config/services.yml
index c4fe3f92..661dc7e1 100644
--- a/src/Wallabag/ImportBundle/Resources/config/services.yml
+++ b/src/Wallabag/ImportBundle/Resources/config/services.yml
@@ -20,6 +20,7 @@ services:
20 arguments: 20 arguments:
21 - "@doctrine.orm.entity_manager" 21 - "@doctrine.orm.entity_manager"
22 - "@wallabag_core.content_proxy" 22 - "@wallabag_core.content_proxy"
23 - "@wallabag_core.tags_assigner"
23 - "@event_dispatcher" 24 - "@event_dispatcher"
24 calls: 25 calls:
25 - [ setClient, [ "@wallabag_import.pocket.client" ] ] 26 - [ setClient, [ "@wallabag_import.pocket.client" ] ]
@@ -32,6 +33,7 @@ services:
32 arguments: 33 arguments:
33 - "@doctrine.orm.entity_manager" 34 - "@doctrine.orm.entity_manager"
34 - "@wallabag_core.content_proxy" 35 - "@wallabag_core.content_proxy"
36 - "@wallabag_core.tags_assigner"
35 - "@event_dispatcher" 37 - "@event_dispatcher"
36 calls: 38 calls:
37 - [ setLogger, [ "@logger" ]] 39 - [ setLogger, [ "@logger" ]]
@@ -43,6 +45,7 @@ services:
43 arguments: 45 arguments:
44 - "@doctrine.orm.entity_manager" 46 - "@doctrine.orm.entity_manager"
45 - "@wallabag_core.content_proxy" 47 - "@wallabag_core.content_proxy"
48 - "@wallabag_core.tags_assigner"
46 - "@event_dispatcher" 49 - "@event_dispatcher"
47 calls: 50 calls:
48 - [ setLogger, [ "@logger" ]] 51 - [ setLogger, [ "@logger" ]]
@@ -54,6 +57,7 @@ services:
54 arguments: 57 arguments:
55 - "@doctrine.orm.entity_manager" 58 - "@doctrine.orm.entity_manager"
56 - "@wallabag_core.content_proxy" 59 - "@wallabag_core.content_proxy"
60 - "@wallabag_core.tags_assigner"
57 - "@event_dispatcher" 61 - "@event_dispatcher"
58 calls: 62 calls:
59 - [ setLogger, [ "@logger" ]] 63 - [ setLogger, [ "@logger" ]]
@@ -65,6 +69,7 @@ services:
65 arguments: 69 arguments:
66 - "@doctrine.orm.entity_manager" 70 - "@doctrine.orm.entity_manager"
67 - "@wallabag_core.content_proxy" 71 - "@wallabag_core.content_proxy"
72 - "@wallabag_core.tags_assigner"
68 - "@event_dispatcher" 73 - "@event_dispatcher"
69 calls: 74 calls:
70 - [ setLogger, [ "@logger" ]] 75 - [ setLogger, [ "@logger" ]]
@@ -76,6 +81,7 @@ services:
76 arguments: 81 arguments:
77 - "@doctrine.orm.entity_manager" 82 - "@doctrine.orm.entity_manager"
78 - "@wallabag_core.content_proxy" 83 - "@wallabag_core.content_proxy"
84 - "@wallabag_core.tags_assigner"
79 - "@event_dispatcher" 85 - "@event_dispatcher"
80 calls: 86 calls:
81 - [ setLogger, [ "@logger" ]] 87 - [ setLogger, [ "@logger" ]]
@@ -87,6 +93,7 @@ services:
87 arguments: 93 arguments:
88 - "@doctrine.orm.entity_manager" 94 - "@doctrine.orm.entity_manager"
89 - "@wallabag_core.content_proxy" 95 - "@wallabag_core.content_proxy"
96 - "@wallabag_core.tags_assigner"
90 - "@event_dispatcher" 97 - "@event_dispatcher"
91 calls: 98 calls:
92 - [ setLogger, [ "@logger" ]] 99 - [ setLogger, [ "@logger" ]]
@@ -97,6 +104,7 @@ services:
97 arguments: 104 arguments:
98 - "@doctrine.orm.entity_manager" 105 - "@doctrine.orm.entity_manager"
99 - "@wallabag_core.content_proxy" 106 - "@wallabag_core.content_proxy"
107 - "@wallabag_core.tags_assigner"
100 - "@event_dispatcher" 108 - "@event_dispatcher"
101 calls: 109 calls:
102 - [ setLogger, [ "@logger" ]] 110 - [ setLogger, [ "@logger" ]]