Move User entity to Core

This commit is contained in:
Yassine Guedidi 2023-12-30 23:32:36 +01:00
parent 4a356a6977
commit a37ded9101
77 changed files with 85 additions and 91 deletions

View file

@ -160,7 +160,7 @@ nelmio_cors:
fos_user:
db_driver: orm
firewall_name: secured_area
user_class: Wallabag\UserBundle\Entity\User
user_class: Wallabag\CoreBundle\Entity\User
registration:
confirmation:
enabled: "%fosuser_confirmation%"

View file

@ -9,7 +9,7 @@ security:
providers:
administrators:
entity:
class: 'Wallabag\UserBundle\Entity\User'
class: 'Wallabag\CoreBundle\Entity\User'
property: username
fos_userbundle:
id: fos_user.user_provider.username_email

View file

@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Wallabag\ApiBundle\Entity\Client;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\UserBundle\Form\NewUserType;
class UserRestController extends WallabagRestController

View file

@ -17,7 +17,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Contracts\Translation\TranslatorInterface;
use Wallabag\ApiBundle\Entity\ApplicationInfo;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class WallabagRestController extends AbstractFOSRestController
{

View file

@ -41,7 +41,7 @@ class AccessToken extends BaseAccessToken
protected $client;
/**
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User")
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\User")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
*/
protected $user;

View file

@ -41,7 +41,7 @@ class AuthCode extends BaseAuthCode
protected $client;
/**
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User")
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\User")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
*/
protected $user;

View file

@ -8,7 +8,7 @@ use JMS\Serializer\Annotation\Groups;
use JMS\Serializer\Annotation\SerializedName;
use JMS\Serializer\Annotation\VirtualProperty;
use OpenApi\Annotations as OA;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
/**
* @ORM\Table("oauth2_clients")
@ -63,7 +63,7 @@ class Client extends BaseClient
protected $secret;
/**
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="clients")
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\User", inversedBy="clients")
*/
private $user;

View file

@ -41,7 +41,7 @@ class RefreshToken extends BaseRefreshToken
protected $client;
/**
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User")
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\User")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
*/
protected $user;

View file

@ -10,8 +10,8 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\UserBundle\Entity\User;
use Wallabag\UserBundle\Repository\UserRepository;
class CleanDuplicatesCommand extends Command

View file

@ -8,9 +8,9 @@ use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\UrlHasher;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\UserBundle\Entity\User;
use Wallabag\UserBundle\Repository\UserRepository;
class GenerateUrlHashesCommand extends Command

View file

@ -22,7 +22,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule;
use Wallabag\CoreBundle\Entity\InternalSetting;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class InstallCommand extends Command
{

View file

@ -8,7 +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\Entity\User;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\UserBundle\Repository\UserRepository;
class ShowUserCommand extends Command

View file

@ -9,8 +9,8 @@ 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\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\RuleBasedTagger;
use Wallabag\UserBundle\Entity\User;
use Wallabag\UserBundle\Repository\UserRepository;
class TagAllCommand extends Command

View file

@ -3,7 +3,7 @@
namespace Wallabag\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController as BaseAbstractController;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
abstract class AbstractController extends BaseAbstractController
{

View file

@ -12,10 +12,10 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Routing\Annotation\Route;
use Wallabag\CoreBundle\Entity\Annotation;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Form\Type\EditAnnotationType;
use Wallabag\CoreBundle\Form\Type\NewAnnotationType;
use Wallabag\CoreBundle\Repository\AnnotationRepository;
use Wallabag\UserBundle\Entity\User;
class AnnotationController extends AbstractFOSRestController
{

View file

@ -13,9 +13,9 @@ use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\PreparePagerForEntries;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\UserBundle\Entity\User;
class FeedController extends AbstractController
{
@ -31,7 +31,7 @@ class FeedController extends AbstractController
*
* @Route("/feed/{username}/{token}/unread/{page}", name="unread_feed", defaults={"page"=1, "_format"="xml"})
*
* @ParamConverter("user", class="Wallabag\UserBundle\Entity\User", converter="username_feed_token_converter")
* @ParamConverter("user", class="Wallabag\CoreBundle\Entity\User", converter="username_feed_token_converter")
*
* @return Response
*/
@ -45,7 +45,7 @@ class FeedController extends AbstractController
*
* @Route("/feed/{username}/{token}/archive/{page}", name="archive_feed", defaults={"page"=1, "_format"="xml"})
*
* @ParamConverter("user", class="Wallabag\UserBundle\Entity\User", converter="username_feed_token_converter")
* @ParamConverter("user", class="Wallabag\CoreBundle\Entity\User", converter="username_feed_token_converter")
*
* @return Response
*/
@ -59,7 +59,7 @@ class FeedController extends AbstractController
*
* @Route("/feed/{username}/{token}/starred/{page}", name="starred_feed", defaults={"page"=1, "_format"="xml"})
*
* @ParamConverter("user", class="Wallabag\UserBundle\Entity\User", converter="username_feed_token_converter")
* @ParamConverter("user", class="Wallabag\CoreBundle\Entity\User", converter="username_feed_token_converter")
*
* @return Response
*/
@ -73,7 +73,7 @@ class FeedController extends AbstractController
*
* @Route("/feed/{username}/{token}/all/{page}", name="all_feed", defaults={"page"=1, "_format"="xml"})
*
* @ParamConverter("user", class="Wallabag\UserBundle\Entity\User", converter="username_feed_token_converter")
* @ParamConverter("user", class="Wallabag\CoreBundle\Entity\User", converter="username_feed_token_converter")
*
* @return Response
*/
@ -87,7 +87,7 @@ class FeedController extends AbstractController
*
* @Route("/feed/{username}/{token}/tags/{slug}/{page}", name="tag_feed", defaults={"page"=1, "_format"="xml"})
*
* @ParamConverter("user", class="Wallabag\UserBundle\Entity\User", converter="username_feed_token_converter")
* @ParamConverter("user", class="Wallabag\CoreBundle\Entity\User", converter="username_feed_token_converter")
* @ParamConverter("tag", options={"mapping": {"slug": "slug"}})
*
* @return Response

View file

@ -12,10 +12,10 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Contracts\Translation\TranslatorInterface;
use Wallabag\CoreBundle\Entity\SiteCredential;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Form\Type\SiteCredentialType;
use Wallabag\CoreBundle\Helper\CryptoProxy;
use Wallabag\CoreBundle\Repository\SiteCredentialRepository;
use Wallabag\UserBundle\Entity\User;
/**
* SiteCredential controller.

View file

@ -17,7 +17,7 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Contracts\Translation\TranslatorInterface;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\UserBundle\Form\NewUserType;
use Wallabag\UserBundle\Form\SearchUserType;
use Wallabag\UserBundle\Form\UserType;

View file

@ -7,7 +7,7 @@ use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use Wallabag\CoreBundle\Entity\Annotation;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class AnnotationFixtures extends Fixture implements DependentFixtureInterface
{

View file

@ -6,7 +6,7 @@ use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class ConfigFixtures extends Fixture implements DependentFixtureInterface
{

View file

@ -7,7 +7,7 @@ use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class EntryFixtures extends Fixture implements DependentFixtureInterface
{

View file

@ -6,7 +6,7 @@ use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class IgnoreOriginUserRuleFixtures extends Fixture implements DependentFixtureInterface
{

View file

@ -8,8 +8,8 @@ use Doctrine\Persistence\ObjectManager;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Wallabag\CoreBundle\Entity\SiteCredential;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\CryptoProxy;
use Wallabag\UserBundle\Entity\User;
class SiteCredentialFixtures extends Fixture implements DependentFixtureInterface, ContainerAwareInterface
{

View file

@ -4,7 +4,7 @@ namespace Wallabag\CoreBundle\DataFixtures;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class UserFixtures extends Fixture
{

View file

@ -10,7 +10,6 @@ use JMS\Serializer\Annotation\SerializedName;
use JMS\Serializer\Annotation\VirtualProperty;
use Symfony\Component\Validator\Constraints as Assert;
use Wallabag\CoreBundle\Helper\EntityTimestampsTrait;
use Wallabag\UserBundle\Entity\User;
/**
* Annotation.
@ -81,7 +80,7 @@ class Annotation
/**
* @Exclude
*
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User")
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\User")
*/
private $user;

View file

@ -6,7 +6,6 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use Wallabag\UserBundle\Entity\User;
/**
* Config.
@ -170,7 +169,7 @@ class Config
private $customCSS;
/**
* @ORM\OneToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="config")
* @ORM\OneToOne(targetEntity="Wallabag\CoreBundle\Entity\User", inversedBy="config")
*/
private $user;

View file

@ -13,7 +13,6 @@ use JMS\Serializer\Annotation\XmlRoot;
use Symfony\Component\Validator\Constraints as Assert;
use Wallabag\CoreBundle\Helper\EntityTimestampsTrait;
use Wallabag\CoreBundle\Helper\UrlHasher;
use Wallabag\UserBundle\Entity\User;
/**
* Entry.
@ -289,7 +288,7 @@ class Entry
/**
* @Exclude
*
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="entries")
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\User", inversedBy="entries")
*
* @Groups({"export_all"})
*/

View file

@ -5,7 +5,6 @@ namespace Wallabag\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Wallabag\CoreBundle\Helper\EntityTimestampsTrait;
use Wallabag\UserBundle\Entity\User;
/**
* SiteCredential.
@ -67,7 +66,7 @@ class SiteCredential
private $updatedAt;
/**
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="siteCredentials")
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\User", inversedBy="siteCredentials")
*/
private $user;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\UserBundle\Entity;
namespace Wallabag\CoreBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
@ -15,8 +15,6 @@ use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface as EmailTwoFactorInterf
use Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface as GoogleTwoFactorInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Wallabag\ApiBundle\Entity\Client;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Helper\EntityTimestampsTrait;
/**

View file

@ -4,7 +4,7 @@ namespace Wallabag\CoreBundle\Event\Listener;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
/**
* Stores the locale of the user in the session after the login.

View file

@ -15,8 +15,8 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\UserBundle\Entity\User;
class EntryFilterType extends AbstractType
{

View file

@ -9,7 +9,7 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class UserInformationType extends AbstractType
{

View file

@ -11,7 +11,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
/**
* This class doesn't have unit test BUT it's fully covered by a functional test with ExportControllerTest.

View file

@ -6,7 +6,7 @@ use Pagerfanta\Adapter\AdapterInterface;
use Pagerfanta\Adapter\NullAdapter;
use Pagerfanta\Pagerfanta;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class PreparePagerForEntries
{

View file

@ -6,7 +6,7 @@ use GuzzleHttp\Psr7\Uri;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
/**
* Manage redirections to avoid redirecting to empty routes.

View file

@ -8,9 +8,9 @@ use RulerZ\RulerZ;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Entity\TaggingRule;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\CoreBundle\Repository\TagRepository;
use Wallabag\UserBundle\Entity\User;
class RuleBasedTagger
{

View file

@ -7,7 +7,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\UserBundle\Repository\UserRepository;
/**
@ -50,7 +50,7 @@ class UsernameFeedTokenConverter implements ParamConverterInterface
$em = $this->registry->getManagerForClass($configuration->getClass());
// Check, if class name is what we need
if (null !== $em && 'Wallabag\UserBundle\Entity\User' !== $em->getClassMetadata($configuration->getClass())->getName()) {
if (null !== $em && 'Wallabag\CoreBundle\Entity\User' !== $em->getClassMetadata($configuration->getClass())->getName()) {
return false;
}

View file

@ -8,9 +8,9 @@ use Twig\Extension\AbstractExtension;
use Twig\Extension\GlobalsInterface;
use Twig\TwigFilter;
use Twig\TwigFunction;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\CoreBundle\Repository\TagRepository;
use Wallabag\UserBundle\Entity\User;
class WallabagExtension extends AbstractExtension implements GlobalsInterface
{

View file

@ -13,6 +13,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\ImportBundle\Import\ChromeImport;
use Wallabag\ImportBundle\Import\DeliciousImport;
use Wallabag\ImportBundle\Import\ElcuratorImport;
@ -24,7 +25,6 @@ use Wallabag\ImportBundle\Import\ReadabilityImport;
use Wallabag\ImportBundle\Import\ShaarliImport;
use Wallabag\ImportBundle\Import\WallabagV1Import;
use Wallabag\ImportBundle\Import\WallabagV2Import;
use Wallabag\UserBundle\Entity\User;
use Wallabag\UserBundle\Repository\UserRepository;
class ImportCommand extends Command

View file

@ -8,10 +8,10 @@ use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Event\EntrySavedEvent;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\UserBundle\Entity\User;
abstract class AbstractImport implements ImportInterface
{

View file

@ -12,7 +12,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints\Length;
use Symfony\Component\Validator\Constraints\NotBlank;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class NewUserType extends AbstractType
{

View file

@ -9,7 +9,7 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class UserType extends AbstractType
{

View file

@ -5,7 +5,7 @@ namespace Wallabag\UserBundle\Repository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\QueryBuilder;
use Doctrine\Persistence\ManagerRegistry;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
/**
* @method User|null findOneById(int $id)

View file

@ -7,8 +7,8 @@ use Symfony\Component\DependencyInjection\Container;
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\UserBundle\Entity\User;
class EntryRestControllerTest extends WallabagApiTestCase
{

View file

@ -7,7 +7,7 @@ use FOS\UserBundle\Model\UserInterface;
use FOS\UserBundle\Model\UserManager;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
abstract class WallabagApiTestCase extends WebTestCase
{

View file

@ -7,7 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class CleanDuplicatesCommandTest extends WallabagCoreTestCase
{

View file

@ -7,7 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class GenerateUrlHashesCommandTest extends WallabagCoreTestCase
{

View file

@ -7,7 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Exception\RuntimeException;
use Symfony\Component\Console\Tester\CommandTester;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class ShowUserCommandTest extends WallabagCoreTestCase
{

View file

@ -7,7 +7,7 @@ use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\CoreBundle\Entity\Annotation;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class AnnotationControllerTest extends WallabagCoreTestCase
{

View file

@ -13,7 +13,7 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Entity\TaggingRule;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class ConfigControllerTest extends WallabagCoreTestCase
{

View file

@ -11,9 +11,9 @@ use Wallabag\CoreBundle\Entity\Config as ConfigEntity;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\SiteCredential;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\CryptoProxy;
use Wallabag\UserBundle\Entity\User;
class EntryControllerTest extends WallabagCoreTestCase
{

View file

@ -5,7 +5,7 @@ namespace Tests\Wallabag\CoreBundle\Controller;
use Doctrine\ORM\EntityManagerInterface;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class FeedControllerTest extends WallabagCoreTestCase
{

View file

@ -4,7 +4,7 @@ namespace Tests\Wallabag\CoreBundle\Controller;
use Doctrine\ORM\EntityManagerInterface;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
class SecurityControllerTest extends WallabagCoreTestCase
{

View file

@ -6,7 +6,7 @@ use Doctrine\ORM\EntityManagerInterface;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
/**
* @group Tag

View file

@ -9,8 +9,8 @@ use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Event\Listener\UserLocaleListener;
use Wallabag\UserBundle\Entity\User;
class UserLocaleListenerTest extends TestCase
{

View file

@ -10,8 +10,8 @@ use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
use Doctrine\ORM\Mapping\ClassMetadata;
use PHPUnit\Framework\TestCase;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber;
use Wallabag\UserBundle\Entity\User;
class TablePrefixSubscriberTest extends TestCase
{
@ -93,7 +93,7 @@ class TablePrefixSubscriberTest extends TestCase
$subscriber = new TablePrefixSubscriber('yo_');
$metaClass = new ClassMetadata('Wallabag\UserBundle\Entity\Entry');
$metaClass = new ClassMetadata('Wallabag\CoreBundle\Entity\Entry');
$metaClass->setPrimaryTable(['name' => 'entry']);
$metaClass->mapManyToMany([
'fieldName' => 'tags',

View file

@ -9,9 +9,9 @@ use Monolog\Logger;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder;
use Wallabag\CoreBundle\Repository\SiteCredentialRepository;
use Wallabag\UserBundle\Entity\User;
class GrabySiteConfigBuilderTest extends WallabagCoreTestCase
{

View file

@ -11,10 +11,10 @@ use Symfony\Component\Validator\ConstraintViolation;
use Symfony\Component\Validator\ConstraintViolationList;
use Symfony\Component\Validator\Validator\RecursiveValidator;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor;
use Wallabag\CoreBundle\Helper\RuleBasedTagger;
use Wallabag\UserBundle\Entity\User;
class ContentProxyTest extends TestCase
{

View file

@ -8,8 +8,8 @@ use Symfony\Component\Routing\Router;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\Redirect;
use Wallabag\UserBundle\Entity\User;
class RedirectTest extends TestCase
{

View file

@ -10,9 +10,9 @@ use Wallabag\CoreBundle\Entity\Config;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule;
use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\RuleBasedIgnoreOriginProcessor;
use Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository;
use Wallabag\UserBundle\Entity\User;
class RuleBasedIgnoreOriginProcessorTest extends TestCase
{

View file

@ -12,10 +12,10 @@ use Wallabag\CoreBundle\Entity\Config;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Entity\TaggingRule;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\RuleBasedTagger;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\CoreBundle\Repository\TagRepository;
use Wallabag\UserBundle\Entity\User;
class RuleBasedTaggerTest extends TestCase
{

View file

@ -5,9 +5,9 @@ namespace Tests\Wallabag\CoreBundle\Helper;
use PHPUnit\Framework\TestCase;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Repository\TagRepository;
use Wallabag\UserBundle\Entity\User;
class TagsAssignerTest extends TestCase
{

View file

@ -9,8 +9,8 @@ use PHPUnit\Framework\TestCase;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter;
use Wallabag\UserBundle\Entity\User;
use Wallabag\UserBundle\Repository\UserRepository;
class UsernameFeedTokenConverterTest extends TestCase

View file

@ -9,7 +9,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\NullOutput;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
abstract class WallabagCoreTestCase extends WebTestCase
{

View file

@ -7,9 +7,9 @@ use PhpAmqpLib\Message\AMQPMessage;
use PHPUnit\Framework\TestCase;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\ImportBundle\Consumer\AMQPEntryConsumer;
use Wallabag\ImportBundle\Import\AbstractImport;
use Wallabag\UserBundle\Entity\User;
use Wallabag\UserBundle\Repository\UserRepository;
class AMQPEntryConsumerTest extends TestCase

View file

@ -6,9 +6,9 @@ use Doctrine\ORM\EntityManager;
use PHPUnit\Framework\TestCase;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\ImportBundle\Consumer\RedisEntryConsumer;
use Wallabag\ImportBundle\Import\AbstractImport;
use Wallabag\UserBundle\Entity\User;
use Wallabag\UserBundle\Repository\UserRepository;
class RedisEntryConsumerTest extends TestCase

View file

@ -11,12 +11,12 @@ use Predis\Client;
use Simpleue\Queue\RedisQueue;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\ChromeImport;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
class ChromeImportTest extends TestCase
{

View file

@ -11,12 +11,12 @@ use Predis\Client;
use Simpleue\Queue\RedisQueue;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\FirefoxImport;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
class FirefoxImportTest extends TestCase
{

View file

@ -12,12 +12,12 @@ use Predis\Client;
use Simpleue\Queue\RedisQueue;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\InstapaperImport;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
class InstapaperImportTest extends TestCase
{

View file

@ -11,12 +11,12 @@ use Predis\Client;
use Simpleue\Queue\RedisQueue;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\PocketHtmlImport;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
class PocketHtmlImportTest extends TestCase
{

View file

@ -15,12 +15,12 @@ use Simpleue\Queue\RedisQueue;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\PocketImport;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
class PocketImportTest extends TestCase
{

View file

@ -11,12 +11,12 @@ use Predis\Client;
use Simpleue\Queue\RedisQueue;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\ReadabilityImport;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
class ReadabilityImportTest extends TestCase
{

View file

@ -11,12 +11,12 @@ use Predis\Client;
use Simpleue\Queue\RedisQueue;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\ShaarliImport;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
class ShaarliImportTest extends TestCase
{

View file

@ -12,12 +12,12 @@ use Predis\Client;
use Simpleue\Queue\RedisQueue;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\WallabagV1Import;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
class WallabagV1ImportTest extends TestCase
{

View file

@ -12,12 +12,12 @@ use Predis\Client;
use Simpleue\Queue\RedisQueue;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\ImportBundle\Import\WallabagV2Import;
use Wallabag\ImportBundle\Redis\Producer;
use Wallabag\UserBundle\Entity\User;
class WallabagV2ImportTest extends TestCase
{

View file

@ -12,7 +12,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\UserBundle\EventListener\CreateConfigListener;
class CreateConfigListenerTest extends TestCase

View file

@ -7,7 +7,7 @@ use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mime\Address;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\User;
use Wallabag\UserBundle\Mailer\AuthCodeMailer;
class AuthCodeMailerTest extends TestCase