mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Migrate getRepository with entities
This commit is contained in:
parent
50a941d8b4
commit
8b7b4975d6
38 changed files with 226 additions and 202 deletions
|
@ -17,6 +17,7 @@ use Wallabag\ImportBundle\Import\PinboardImport;
|
|||
use Wallabag\ImportBundle\Import\ReadabilityImport;
|
||||
use Wallabag\ImportBundle\Import\WallabagV1Import;
|
||||
use Wallabag\ImportBundle\Import\WallabagV2Import;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class ImportCommand extends ContainerAwareCommand
|
||||
{
|
||||
|
@ -47,9 +48,9 @@ class ImportCommand extends ContainerAwareCommand
|
|||
$em->getConnection()->getConfiguration()->setSQLLogger(null);
|
||||
|
||||
if ($input->getOption('useUserId')) {
|
||||
$entityUser = $em->getRepository('WallabagUserBundle:User')->findOneById($input->getArgument('username'));
|
||||
$entityUser = $em->getRepository(User::class)->findOneById($input->getArgument('username'));
|
||||
} else {
|
||||
$entityUser = $em->getRepository('WallabagUserBundle:User')->findOneByUsername($input->getArgument('username'));
|
||||
$entityUser = $em->getRepository(User::class)->findOneByUsername($input->getArgument('username'));
|
||||
}
|
||||
|
||||
if (!\is_object($entityUser)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue