]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Command/TagAllCommand.php
Merge pull request #3227 from wallabag/oauth-client-credentials
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Command / TagAllCommand.php
index db1a9ab79d3b28d361e7498b156a57dcc4f4e6b7..9843674e23980173e46f41b30f6d158c8c75fc00 100644 (file)
@@ -34,10 +34,13 @@ class TagAllCommand extends ContainerAwareCommand
         }
         $tagger = $this->getContainer()->get('wallabag_core.rule_based_tagger');
 
-        $output->write(sprintf('Tagging entries for user « <info>%s</info> »... ', $user->getUserName()));
+        $output->write(sprintf('Tagging entries for user « <comment>%s</comment> »... ', $user->getUserName()));
 
         $entries = $tagger->tagAllForUser($user);
 
+        $output->writeln('<info>Done.</info>');
+        $output->write(sprintf('Persist entries ... ', $user->getUserName()));
+
         $em = $this->getDoctrine()->getManager();
         foreach ($entries as $entry) {
             $em->persist($entry);
@@ -56,7 +59,7 @@ class TagAllCommand extends ContainerAwareCommand
      */
     private function getUser($username)
     {
-        return $this->getDoctrine()->getRepository('WallabagUserBundle:User')->findOneByUserName($username);
+        return $this->getContainer()->get('wallabag_user.user_repository')->findOneByUserName($username);
     }
 
     private function getDoctrine()