forked from wallabag/wallabag
Use FQCN as service name for UserRepository
This commit is contained in:
@ -10,6 +10,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
use Wallabag\UserBundle\Repository\UserRepository;
|
||||
|
||||
class CleanDuplicatesCommand extends ContainerAwareCommand
|
||||
{
|
||||
@ -49,7 +50,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand
|
||||
|
||||
$this->io->success('Finished cleaning.');
|
||||
} else {
|
||||
$users = $this->getContainer()->get('wallabag_user.user_repository')->findAll();
|
||||
$users = $this->getContainer()->get(UserRepository::class)->findAll();
|
||||
|
||||
$this->io->text(sprintf('Cleaning through <info>%d</info> user accounts', \count($users)));
|
||||
|
||||
@ -109,6 +110,6 @@ class CleanDuplicatesCommand extends ContainerAwareCommand
|
||||
*/
|
||||
private function getUser($username)
|
||||
{
|
||||
return $this->getContainer()->get('wallabag_user.user_repository')->findOneByUserName($username);
|
||||
return $this->getContainer()->get(UserRepository::class)->findOneByUserName($username);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Wallabag\UserBundle\Repository\UserRepository;
|
||||
|
||||
class ExportCommand extends ContainerAwareCommand
|
||||
{
|
||||
@ -35,7 +36,7 @@ class ExportCommand extends ContainerAwareCommand
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
try {
|
||||
$user = $this->getContainer()->get('wallabag_user.user_repository')->findOneByUserName($input->getArgument('username'));
|
||||
$user = $this->getContainer()->get(UserRepository::class)->findOneByUserName($input->getArgument('username'));
|
||||
} catch (NoResultException $e) {
|
||||
$io->error(sprintf('User "%s" not found.', $input->getArgument('username')));
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Wallabag\UserBundle\Repository\UserRepository;
|
||||
|
||||
class ListUserCommand extends ContainerAwareCommand
|
||||
{
|
||||
@ -26,13 +27,13 @@ class ListUserCommand extends ContainerAwareCommand
|
||||
{
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
$users = $this->getContainer()->get('wallabag_user.user_repository')
|
||||
$users = $this->getContainer()->get(UserRepository::class)
|
||||
->getQueryBuilderForSearch($input->getArgument('search'))
|
||||
->setMaxResults($input->getOption('limit'))
|
||||
->getQuery()
|
||||
->getResult();
|
||||
|
||||
$nbUsers = $this->getContainer()->get('wallabag_user.user_repository')
|
||||
$nbUsers = $this->getContainer()->get(UserRepository::class)
|
||||
->getSumUsers();
|
||||
|
||||
$rows = [];
|
||||
|
||||
@ -9,6 +9,7 @@ use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Wallabag\CoreBundle\Event\EntrySavedEvent;
|
||||
use Wallabag\UserBundle\Repository\UserRepository;
|
||||
|
||||
class ReloadEntryCommand extends ContainerAwareCommand
|
||||
{
|
||||
@ -30,7 +31,7 @@ class ReloadEntryCommand extends ContainerAwareCommand
|
||||
if ($username = $input->getArgument('username')) {
|
||||
try {
|
||||
$userId = $this->getContainer()
|
||||
->get('wallabag_user.user_repository')
|
||||
->get(UserRepository::class)
|
||||
->findOneByUserName($username)
|
||||
->getId();
|
||||
} catch (NoResultException $e) {
|
||||
|
||||
@ -9,6 +9,7 @@ use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
use Wallabag\UserBundle\Repository\UserRepository;
|
||||
|
||||
class ShowUserCommand extends ContainerAwareCommand
|
||||
{
|
||||
@ -68,6 +69,6 @@ class ShowUserCommand extends ContainerAwareCommand
|
||||
*/
|
||||
private function getUser($username)
|
||||
{
|
||||
return $this->getContainer()->get('wallabag_user.user_repository')->findOneByUserName($username);
|
||||
return $this->getContainer()->get(UserRepository::class)->findOneByUserName($username);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Wallabag\UserBundle\Repository\UserRepository;
|
||||
|
||||
class TagAllCommand extends ContainerAwareCommand
|
||||
{
|
||||
@ -63,7 +64,7 @@ class TagAllCommand extends ContainerAwareCommand
|
||||
*/
|
||||
private function getUser($username)
|
||||
{
|
||||
return $this->getContainer()->get('wallabag_user.user_repository')->findOneByUserName($username);
|
||||
return $this->getContainer()->get(UserRepository::class)->findOneByUserName($username);
|
||||
}
|
||||
|
||||
private function getDoctrine()
|
||||
|
||||
Reference in New Issue
Block a user