From 76707536c65dd6b7b9a27f630d3a78f27c40b86f Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Tue, 19 Apr 2022 12:18:56 +0200 Subject: [PATCH] Exclude value objects from doctrine mapped classes --- src/Command/CreateClientCommand.php | 6 +++--- src/Command/ListClientsCommand.php | 6 +++--- src/Command/UpdateClientCommand.php | 6 +++--- src/Converter/ScopeConverter.php | 2 +- src/Converter/ScopeConverterInterface.php | 2 +- src/DBAL/Type/Grant.php | 2 +- src/DBAL/Type/RedirectUri.php | 2 +- src/DBAL/Type/Scope.php | 2 +- src/DependencyInjection/LeagueOAuth2ServerExtension.php | 2 +- src/Event/AuthorizationRequestResolveEvent.php | 2 +- src/Event/ScopeResolveEvent.php | 4 ++-- src/Event/UserResolveEvent.php | 2 +- src/EventListener/AddClientDefaultScopesListener.php | 2 +- src/Manager/ClientFilter.php | 6 +++--- src/Manager/Doctrine/ClientManager.php | 6 +++--- src/Manager/InMemory/ClientManager.php | 6 +++--- src/Manager/InMemory/ScopeManager.php | 2 +- src/Manager/ScopeManagerInterface.php | 2 +- src/Model/AbstractClient.php | 4 ++++ src/Model/AccessToken.php | 2 ++ src/Model/AuthorizationCode.php | 2 ++ src/Persistence/Mapping/Driver.php | 3 +++ src/Repository/ScopeRepository.php | 4 ++-- src/Repository/UserRepository.php | 2 +- src/{Model => ValueObject}/Grant.php | 2 +- src/{Model => ValueObject}/RedirectUri.php | 2 +- src/{Model => ValueObject}/Scope.php | 2 +- tests/Acceptance/CreateClientCommandTest.php | 2 +- tests/Acceptance/DoctrineClientManagerTest.php | 2 +- tests/Acceptance/InMemoryClientManagerTest.php | 2 +- tests/Acceptance/ListClientsCommandTest.php | 4 ++-- tests/Acceptance/UpdateClientCommandTest.php | 6 +++--- tests/Fixtures/FixtureFactory.php | 6 +++--- 33 files changed, 59 insertions(+), 48 deletions(-) rename src/{Model => ValueObject}/Grant.php (87%) rename src/{Model => ValueObject}/RedirectUri.php (91%) rename src/{Model => ValueObject}/Scope.php (87%) diff --git a/src/Command/CreateClientCommand.php b/src/Command/CreateClientCommand.php index 257ce038..ab5b00db 100644 --- a/src/Command/CreateClientCommand.php +++ b/src/Command/CreateClientCommand.php @@ -6,9 +6,9 @@ use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface; use League\Bundle\OAuth2ServerBundle\Model\AbstractClient; -use League\Bundle\OAuth2ServerBundle\Model\Grant; -use League\Bundle\OAuth2ServerBundle\Model\RedirectUri; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; diff --git a/src/Command/ListClientsCommand.php b/src/Command/ListClientsCommand.php index 00642146..371b76d4 100644 --- a/src/Command/ListClientsCommand.php +++ b/src/Command/ListClientsCommand.php @@ -7,9 +7,9 @@ use League\Bundle\OAuth2ServerBundle\Manager\ClientFilter; use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface; use League\Bundle\OAuth2ServerBundle\Model\AbstractClient; -use League\Bundle\OAuth2ServerBundle\Model\Grant; -use League\Bundle\OAuth2ServerBundle\Model\RedirectUri; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; diff --git a/src/Command/UpdateClientCommand.php b/src/Command/UpdateClientCommand.php index b645eef4..0926aecc 100644 --- a/src/Command/UpdateClientCommand.php +++ b/src/Command/UpdateClientCommand.php @@ -5,9 +5,9 @@ namespace League\Bundle\OAuth2ServerBundle\Command; use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface; -use League\Bundle\OAuth2ServerBundle\Model\Grant; -use League\Bundle\OAuth2ServerBundle\Model\RedirectUri; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; diff --git a/src/Converter/ScopeConverter.php b/src/Converter/ScopeConverter.php index 5d0c1e93..49931e9d 100644 --- a/src/Converter/ScopeConverter.php +++ b/src/Converter/ScopeConverter.php @@ -5,7 +5,7 @@ namespace League\Bundle\OAuth2ServerBundle\Converter; use League\Bundle\OAuth2ServerBundle\Entity\Scope as ScopeEntity; -use League\Bundle\OAuth2ServerBundle\Model\Scope as ScopeModel; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope as ScopeModel; use League\OAuth2\Server\Entities\ScopeEntityInterface; final class ScopeConverter implements ScopeConverterInterface diff --git a/src/Converter/ScopeConverterInterface.php b/src/Converter/ScopeConverterInterface.php index de915b77..24534fd5 100644 --- a/src/Converter/ScopeConverterInterface.php +++ b/src/Converter/ScopeConverterInterface.php @@ -5,7 +5,7 @@ namespace League\Bundle\OAuth2ServerBundle\Converter; use League\Bundle\OAuth2ServerBundle\Entity\Scope as ScopeEntity; -use League\Bundle\OAuth2ServerBundle\Model\Scope as ScopeModel; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope as ScopeModel; use League\OAuth2\Server\Entities\ScopeEntityInterface; interface ScopeConverterInterface diff --git a/src/DBAL/Type/Grant.php b/src/DBAL/Type/Grant.php index b5f6690c..781cab48 100644 --- a/src/DBAL/Type/Grant.php +++ b/src/DBAL/Type/Grant.php @@ -4,7 +4,7 @@ namespace League\Bundle\OAuth2ServerBundle\DBAL\Type; -use League\Bundle\OAuth2ServerBundle\Model\Grant as GrantModel; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant as GrantModel; /** * @extends ImplodedArray diff --git a/src/DBAL/Type/RedirectUri.php b/src/DBAL/Type/RedirectUri.php index bdbe5b7f..840e6a49 100644 --- a/src/DBAL/Type/RedirectUri.php +++ b/src/DBAL/Type/RedirectUri.php @@ -4,7 +4,7 @@ namespace League\Bundle\OAuth2ServerBundle\DBAL\Type; -use League\Bundle\OAuth2ServerBundle\Model\RedirectUri as RedirectUriModel; +use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri as RedirectUriModel; /** * @template-extends ImplodedArray diff --git a/src/DBAL/Type/Scope.php b/src/DBAL/Type/Scope.php index 554bf154..c946815f 100644 --- a/src/DBAL/Type/Scope.php +++ b/src/DBAL/Type/Scope.php @@ -4,7 +4,7 @@ namespace League\Bundle\OAuth2ServerBundle\DBAL\Type; -use League\Bundle\OAuth2ServerBundle\Model\Scope as ScopeModel; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope as ScopeModel; /** * @extends ImplodedArray diff --git a/src/DependencyInjection/LeagueOAuth2ServerExtension.php b/src/DependencyInjection/LeagueOAuth2ServerExtension.php index 7796c051..c792eb99 100644 --- a/src/DependencyInjection/LeagueOAuth2ServerExtension.php +++ b/src/DependencyInjection/LeagueOAuth2ServerExtension.php @@ -16,7 +16,7 @@ use League\Bundle\OAuth2ServerBundle\Manager\Doctrine\RefreshTokenManager; use League\Bundle\OAuth2ServerBundle\Manager\InMemory\AccessTokenManager as InMemoryAccessTokenManager; use League\Bundle\OAuth2ServerBundle\Manager\ScopeManagerInterface; -use League\Bundle\OAuth2ServerBundle\Model\Scope as ScopeModel; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope as ScopeModel; use League\Bundle\OAuth2ServerBundle\Persistence\Mapping\Driver; use League\Bundle\OAuth2ServerBundle\Security\Authenticator\OAuth2Authenticator; use League\Bundle\OAuth2ServerBundle\Service\CredentialsRevoker\DoctrineCredentialsRevoker; diff --git a/src/Event/AuthorizationRequestResolveEvent.php b/src/Event/AuthorizationRequestResolveEvent.php index 30146f10..dd431f29 100644 --- a/src/Event/AuthorizationRequestResolveEvent.php +++ b/src/Event/AuthorizationRequestResolveEvent.php @@ -5,7 +5,7 @@ namespace League\Bundle\OAuth2ServerBundle\Event; use League\Bundle\OAuth2ServerBundle\Model\AbstractClient; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use League\OAuth2\Server\RequestTypes\AuthorizationRequest; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\User\UserInterface; diff --git a/src/Event/ScopeResolveEvent.php b/src/Event/ScopeResolveEvent.php index 244c23f8..9248d0f1 100644 --- a/src/Event/ScopeResolveEvent.php +++ b/src/Event/ScopeResolveEvent.php @@ -5,8 +5,8 @@ namespace League\Bundle\OAuth2ServerBundle\Event; use League\Bundle\OAuth2ServerBundle\Model\AbstractClient; -use League\Bundle\OAuth2ServerBundle\Model\Grant; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use Symfony\Contracts\EventDispatcher\Event; final class ScopeResolveEvent extends Event diff --git a/src/Event/UserResolveEvent.php b/src/Event/UserResolveEvent.php index cbdaba8a..c36487ea 100644 --- a/src/Event/UserResolveEvent.php +++ b/src/Event/UserResolveEvent.php @@ -5,7 +5,7 @@ namespace League\Bundle\OAuth2ServerBundle\Event; use League\Bundle\OAuth2ServerBundle\Model\AbstractClient; -use League\Bundle\OAuth2ServerBundle\Model\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Contracts\EventDispatcher\Event; diff --git a/src/EventListener/AddClientDefaultScopesListener.php b/src/EventListener/AddClientDefaultScopesListener.php index e8dac4c7..da7cccad 100644 --- a/src/EventListener/AddClientDefaultScopesListener.php +++ b/src/EventListener/AddClientDefaultScopesListener.php @@ -5,7 +5,7 @@ namespace League\Bundle\OAuth2ServerBundle\EventListener; use League\Bundle\OAuth2ServerBundle\Event\PreSaveClientEvent; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; /** * Sets default scopes to the client before being saved by a ClientManager if no scope is specified. diff --git a/src/Manager/ClientFilter.php b/src/Manager/ClientFilter.php index 883e3e64..678b6f25 100644 --- a/src/Manager/ClientFilter.php +++ b/src/Manager/ClientFilter.php @@ -4,9 +4,9 @@ namespace League\Bundle\OAuth2ServerBundle\Manager; -use League\Bundle\OAuth2ServerBundle\Model\Grant; -use League\Bundle\OAuth2ServerBundle\Model\RedirectUri; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; final class ClientFilter { diff --git a/src/Manager/Doctrine/ClientManager.php b/src/Manager/Doctrine/ClientManager.php index e35d9598..269ed04a 100644 --- a/src/Manager/Doctrine/ClientManager.php +++ b/src/Manager/Doctrine/ClientManager.php @@ -9,9 +9,9 @@ use League\Bundle\OAuth2ServerBundle\Manager\ClientFilter; use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface; use League\Bundle\OAuth2ServerBundle\Model\AbstractClient; -use League\Bundle\OAuth2ServerBundle\Model\Grant; -use League\Bundle\OAuth2ServerBundle\Model\RedirectUri; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use League\Bundle\OAuth2ServerBundle\OAuth2Events; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; diff --git a/src/Manager/InMemory/ClientManager.php b/src/Manager/InMemory/ClientManager.php index c413cb9a..c096874f 100644 --- a/src/Manager/InMemory/ClientManager.php +++ b/src/Manager/InMemory/ClientManager.php @@ -8,9 +8,9 @@ use League\Bundle\OAuth2ServerBundle\Manager\ClientFilter; use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface; use League\Bundle\OAuth2ServerBundle\Model\AbstractClient; -use League\Bundle\OAuth2ServerBundle\Model\Grant; -use League\Bundle\OAuth2ServerBundle\Model\RedirectUri; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use League\Bundle\OAuth2ServerBundle\OAuth2Events; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; diff --git a/src/Manager/InMemory/ScopeManager.php b/src/Manager/InMemory/ScopeManager.php index 2ec2861c..0fee82c8 100644 --- a/src/Manager/InMemory/ScopeManager.php +++ b/src/Manager/InMemory/ScopeManager.php @@ -5,7 +5,7 @@ namespace League\Bundle\OAuth2ServerBundle\Manager\InMemory; use League\Bundle\OAuth2ServerBundle\Manager\ScopeManagerInterface; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; final class ScopeManager implements ScopeManagerInterface { diff --git a/src/Manager/ScopeManagerInterface.php b/src/Manager/ScopeManagerInterface.php index bab1bb65..854563c7 100644 --- a/src/Manager/ScopeManagerInterface.php +++ b/src/Manager/ScopeManagerInterface.php @@ -4,7 +4,7 @@ namespace League\Bundle\OAuth2ServerBundle\Manager; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; interface ScopeManagerInterface { diff --git a/src/Model/AbstractClient.php b/src/Model/AbstractClient.php index 4a4f8163..5730587b 100644 --- a/src/Model/AbstractClient.php +++ b/src/Model/AbstractClient.php @@ -4,6 +4,10 @@ namespace League\Bundle\OAuth2ServerBundle\Model; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; + /** * @psalm-consistent-constructor * diff --git a/src/Model/AccessToken.php b/src/Model/AccessToken.php index d887e1e0..6f7ab87a 100644 --- a/src/Model/AccessToken.php +++ b/src/Model/AccessToken.php @@ -4,6 +4,8 @@ namespace League\Bundle\OAuth2ServerBundle\Model; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; + class AccessToken { /** diff --git a/src/Model/AuthorizationCode.php b/src/Model/AuthorizationCode.php index 7df631d5..7684ba66 100644 --- a/src/Model/AuthorizationCode.php +++ b/src/Model/AuthorizationCode.php @@ -4,6 +4,8 @@ namespace League\Bundle\OAuth2ServerBundle\Model; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; + class AuthorizationCode { /** diff --git a/src/Persistence/Mapping/Driver.php b/src/Persistence/Mapping/Driver.php index f0eadc3a..eeb874a3 100644 --- a/src/Persistence/Mapping/Driver.php +++ b/src/Persistence/Mapping/Driver.php @@ -11,7 +11,10 @@ use League\Bundle\OAuth2ServerBundle\Model\AccessToken; use League\Bundle\OAuth2ServerBundle\Model\AuthorizationCode; use League\Bundle\OAuth2ServerBundle\Model\Client; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; use League\Bundle\OAuth2ServerBundle\Model\RefreshToken; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; /** * Metadata driver that enables mapping dynamically accordingly to container configuration. diff --git a/src/Repository/ScopeRepository.php b/src/Repository/ScopeRepository.php index 6cbbd6fe..e0f9174b 100644 --- a/src/Repository/ScopeRepository.php +++ b/src/Repository/ScopeRepository.php @@ -9,8 +9,8 @@ use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface; use League\Bundle\OAuth2ServerBundle\Manager\ScopeManagerInterface; use League\Bundle\OAuth2ServerBundle\Model\AbstractClient; -use League\Bundle\OAuth2ServerBundle\Model\Grant; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use League\Bundle\OAuth2ServerBundle\OAuth2Events; use League\OAuth2\Server\Entities\ClientEntityInterface; use League\OAuth2\Server\Entities\ScopeEntityInterface; diff --git a/src/Repository/UserRepository.php b/src/Repository/UserRepository.php index 00ea523e..61c25b1f 100644 --- a/src/Repository/UserRepository.php +++ b/src/Repository/UserRepository.php @@ -8,7 +8,7 @@ use League\Bundle\OAuth2ServerBundle\Event\UserResolveEvent; use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface; use League\Bundle\OAuth2ServerBundle\Model\AbstractClient; -use League\Bundle\OAuth2ServerBundle\Model\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; use League\Bundle\OAuth2ServerBundle\OAuth2Events; use League\OAuth2\Server\Entities\ClientEntityInterface; use League\OAuth2\Server\Entities\UserEntityInterface; diff --git a/src/Model/Grant.php b/src/ValueObject/Grant.php similarity index 87% rename from src/Model/Grant.php rename to src/ValueObject/Grant.php index 1b8ed0a2..96805af8 100644 --- a/src/Model/Grant.php +++ b/src/ValueObject/Grant.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace League\Bundle\OAuth2ServerBundle\Model; +namespace League\Bundle\OAuth2ServerBundle\ValueObject; /** * @psalm-immutable diff --git a/src/Model/RedirectUri.php b/src/ValueObject/RedirectUri.php similarity index 91% rename from src/Model/RedirectUri.php rename to src/ValueObject/RedirectUri.php index 951197a0..f8450a82 100644 --- a/src/Model/RedirectUri.php +++ b/src/ValueObject/RedirectUri.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace League\Bundle\OAuth2ServerBundle\Model; +namespace League\Bundle\OAuth2ServerBundle\ValueObject; /** * @psalm-immutable diff --git a/src/Model/Scope.php b/src/ValueObject/Scope.php similarity index 87% rename from src/Model/Scope.php rename to src/ValueObject/Scope.php index 5d71aac3..ae1a30e2 100644 --- a/src/Model/Scope.php +++ b/src/ValueObject/Scope.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace League\Bundle\OAuth2ServerBundle\Model; +namespace League\Bundle\OAuth2ServerBundle\ValueObject; /** * @psalm-immutable diff --git a/tests/Acceptance/CreateClientCommandTest.php b/tests/Acceptance/CreateClientCommandTest.php index c332b80b..391c7767 100644 --- a/tests/Acceptance/CreateClientCommandTest.php +++ b/tests/Acceptance/CreateClientCommandTest.php @@ -6,7 +6,7 @@ use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface; use League\Bundle\OAuth2ServerBundle\Model\Client; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use Symfony\Component\Console\Tester\CommandTester; final class CreateClientCommandTest extends AbstractAcceptanceTest diff --git a/tests/Acceptance/DoctrineClientManagerTest.php b/tests/Acceptance/DoctrineClientManagerTest.php index 4e0cd573..b118de7b 100644 --- a/tests/Acceptance/DoctrineClientManagerTest.php +++ b/tests/Acceptance/DoctrineClientManagerTest.php @@ -9,7 +9,7 @@ use League\Bundle\OAuth2ServerBundle\Model\AccessToken; use League\Bundle\OAuth2ServerBundle\Model\Client; use League\Bundle\OAuth2ServerBundle\Model\RefreshToken; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use League\Bundle\OAuth2ServerBundle\Tests\Fixtures\FixtureFactory; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; diff --git a/tests/Acceptance/InMemoryClientManagerTest.php b/tests/Acceptance/InMemoryClientManagerTest.php index 106a40ee..2ce9af85 100644 --- a/tests/Acceptance/InMemoryClientManagerTest.php +++ b/tests/Acceptance/InMemoryClientManagerTest.php @@ -6,7 +6,7 @@ use League\Bundle\OAuth2ServerBundle\Manager\InMemory\ClientManager as InMemoryClientManager; use League\Bundle\OAuth2ServerBundle\Model\Client; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use League\Bundle\OAuth2ServerBundle\Tests\Acceptance\AbstractAcceptanceTest; use League\Bundle\OAuth2ServerBundle\Tests\Fixtures\FixtureFactory; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; diff --git a/tests/Acceptance/ListClientsCommandTest.php b/tests/Acceptance/ListClientsCommandTest.php index 752e191a..7b9c9cfd 100644 --- a/tests/Acceptance/ListClientsCommandTest.php +++ b/tests/Acceptance/ListClientsCommandTest.php @@ -6,8 +6,8 @@ use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface; use League\Bundle\OAuth2ServerBundle\Model\Client; -use League\Bundle\OAuth2ServerBundle\Model\RedirectUri; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Tester\CommandTester; diff --git a/tests/Acceptance/UpdateClientCommandTest.php b/tests/Acceptance/UpdateClientCommandTest.php index b14a7a59..77ae5430 100644 --- a/tests/Acceptance/UpdateClientCommandTest.php +++ b/tests/Acceptance/UpdateClientCommandTest.php @@ -6,9 +6,9 @@ use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface; use League\Bundle\OAuth2ServerBundle\Model\Client; -use League\Bundle\OAuth2ServerBundle\Model\Grant; -use League\Bundle\OAuth2ServerBundle\Model\RedirectUri; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; use Symfony\Component\Console\Tester\CommandTester; final class UpdateClientCommandTest extends AbstractAcceptanceTest diff --git a/tests/Fixtures/FixtureFactory.php b/tests/Fixtures/FixtureFactory.php index 657ad80e..666fc878 100644 --- a/tests/Fixtures/FixtureFactory.php +++ b/tests/Fixtures/FixtureFactory.php @@ -12,10 +12,10 @@ use League\Bundle\OAuth2ServerBundle\Model\AccessToken; use League\Bundle\OAuth2ServerBundle\Model\AuthorizationCode; use League\Bundle\OAuth2ServerBundle\Model\Client; -use League\Bundle\OAuth2ServerBundle\Model\Grant; -use League\Bundle\OAuth2ServerBundle\Model\RedirectUri; +use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; +use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; use League\Bundle\OAuth2ServerBundle\Model\RefreshToken; -use League\Bundle\OAuth2ServerBundle\Model\Scope; +use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; /** * Development hints: