mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-22 17:11:07 +00:00
Move Api entities to Core
This commit is contained in:
parent
3fc0b5fa5b
commit
81577ef6b0
13 changed files with 23 additions and 23 deletions
|
@ -172,10 +172,10 @@ fos_user:
|
|||
|
||||
fos_oauth_server:
|
||||
db_driver: orm
|
||||
client_class: Wallabag\ApiBundle\Entity\Client
|
||||
access_token_class: Wallabag\ApiBundle\Entity\AccessToken
|
||||
refresh_token_class: Wallabag\ApiBundle\Entity\RefreshToken
|
||||
auth_code_class: Wallabag\ApiBundle\Entity\AuthCode
|
||||
client_class: Wallabag\CoreBundle\Entity\Api\Client
|
||||
access_token_class: Wallabag\CoreBundle\Entity\Api\AccessToken
|
||||
refresh_token_class: Wallabag\CoreBundle\Entity\Api\RefreshToken
|
||||
auth_code_class: Wallabag\CoreBundle\Entity\Api\AuthCode
|
||||
service:
|
||||
user_provider: fos_user.user_provider.username_email
|
||||
options:
|
||||
|
|
|
@ -9,7 +9,7 @@ use Symfony\Component\Form\Extension\Core\Type\TextType;
|
|||
use Symfony\Component\Form\Extension\Core\Type\UrlType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Wallabag\ApiBundle\Entity\Client;
|
||||
use Wallabag\CoreBundle\Entity\Api\Client;
|
||||
|
||||
class ClientType extends AbstractType
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Wallabag\ApiBundle\Repository;
|
|||
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Wallabag\ApiBundle\Entity\Client;
|
||||
use Wallabag\CoreBundle\Entity\Api\Client;
|
||||
|
||||
/**
|
||||
* @method Client[] findByUser(int $userId)
|
||||
|
|
|
@ -8,10 +8,10 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Wallabag\ApiBundle\Entity\Client;
|
||||
use Wallabag\ApiBundle\Form\Type\ClientType;
|
||||
use Wallabag\ApiBundle\Repository\ClientRepository;
|
||||
use Wallabag\CoreBundle\Controller\AbstractController;
|
||||
use Wallabag\CoreBundle\Entity\Api\Client;
|
||||
|
||||
class DeveloperController extends AbstractController
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
|||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Wallabag\ApiBundle\Entity\Client;
|
||||
use Wallabag\CoreBundle\Entity\Api\Client;
|
||||
use Wallabag\CoreBundle\Entity\User;
|
||||
use Wallabag\CoreBundle\Form\Type\NewUserType;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInt
|
|||
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\CoreBundle\Entity\Api\ApplicationInfo;
|
||||
use Wallabag\CoreBundle\Entity\User;
|
||||
|
||||
class WallabagRestController extends AbstractFOSRestController
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\ApiBundle\Entity;
|
||||
namespace Wallabag\CoreBundle\Entity\Api;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken;
|
||||
|
@ -35,7 +35,7 @@ class AccessToken extends BaseAccessToken
|
|||
protected $id;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Client", inversedBy="accessTokens")
|
||||
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Api\Client", inversedBy="accessTokens")
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
protected $client;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\ApiBundle\Entity;
|
||||
namespace Wallabag\CoreBundle\Entity\Api;
|
||||
|
||||
use OpenApi\Annotations as OA;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\ApiBundle\Entity;
|
||||
namespace Wallabag\CoreBundle\Entity\Api;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
|
||||
|
@ -35,7 +35,7 @@ class AuthCode extends BaseAuthCode
|
|||
protected $id;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Client")
|
||||
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Api\Client")
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
protected $client;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\ApiBundle\Entity;
|
||||
namespace Wallabag\CoreBundle\Entity\Api;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use FOS\OAuthServerBundle\Entity\Client as BaseClient;
|
||||
|
@ -39,12 +39,12 @@ class Client extends BaseClient
|
|||
protected $name;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="RefreshToken", mappedBy="client", cascade={"remove"})
|
||||
* @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\Api\RefreshToken", mappedBy="client", cascade={"remove"})
|
||||
*/
|
||||
protected $refreshTokens;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="AccessToken", mappedBy="client", cascade={"remove"})
|
||||
* @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\Api\AccessToken", mappedBy="client", cascade={"remove"})
|
||||
*/
|
||||
protected $accessTokens;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\ApiBundle\Entity;
|
||||
namespace Wallabag\CoreBundle\Entity\Api;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken;
|
||||
|
@ -35,7 +35,7 @@ class RefreshToken extends BaseRefreshToken
|
|||
protected $id;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Client", inversedBy="refreshTokens")
|
||||
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Api\Client", inversedBy="refreshTokens")
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
protected $client;
|
|
@ -14,7 +14,7 @@ use Scheb\TwoFactorBundle\Model\BackupCodeInterface;
|
|||
use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface as EmailTwoFactorInterface;
|
||||
use Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface as GoogleTwoFactorInterface;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Wallabag\ApiBundle\Entity\Client;
|
||||
use Wallabag\CoreBundle\Entity\Api\Client;
|
||||
use Wallabag\CoreBundle\Helper\EntityTimestampsTrait;
|
||||
|
||||
/**
|
||||
|
@ -139,9 +139,9 @@ class User extends BaseUser implements EmailTwoFactorInterface, GoogleTwoFactorI
|
|||
protected $siteCredentials;
|
||||
|
||||
/**
|
||||
* @var ArrayCollection&iterable<\Wallabag\ApiBundle\Entity\Client>
|
||||
* @var ArrayCollection&iterable<\Wallabag\CoreBundle\Entity\Api\Client>
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity="Wallabag\ApiBundle\Entity\Client", mappedBy="user", cascade={"remove"})
|
||||
* @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\Api\Client", mappedBy="user", cascade={"remove"})
|
||||
*/
|
||||
protected $clients;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Tests\Wallabag\CoreBundle\Controller\Api;
|
|||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||
use Wallabag\ApiBundle\Entity\Client;
|
||||
use Wallabag\CoreBundle\Entity\Api\Client;
|
||||
|
||||
class DeveloperControllerTest extends WallabagCoreTestCase
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue