1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Fix getContainer in command

This commit is contained in:
Jeremy Benoist 2017-06-10 13:19:43 +02:00
parent 18c38dffc6
commit 03ce43d466
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
5 changed files with 7 additions and 8 deletions

View file

@ -46,7 +46,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand
return 1;
}
} else {
$users = $this->get('wallabag_user.user_repository')->findAll();
$users = $this->getContainer()->get('wallabag_user.user_repository')->findAll();
$output->writeln(sprintf('Cleaning through %d user accounts', count($users)));
@ -66,7 +66,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand
private function cleanDuplicates(User $user)
{
$em = $this->getContainer()->get('doctrine.orm.entity_manager');
$repo = $this->get('wallabag_core.entry_repository');
$repo = $this->getContainer()->get('wallabag_core.entry_repository');
$entries = $repo->getAllEntriesIdAndUrl($user->getId());
@ -109,7 +109,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand
*/
private function getUser($username)
{
return $this->get('wallabag_user.user_repository')->findOneByUserName($username);
return $this->getContainer()->get('wallabag_user.user_repository')->findOneByUserName($username);
}
private function getDoctrine()