From f7684802ac722f9b64b6bbf3a4f04a0e01ccf957 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 11 Mar 2024 17:39:12 +0100 Subject: [PATCH] just moving files --- .gitignore | 1 + src/{ => Core/Blog}/Command/AddUserCommand.php | 8 ++++---- .../Blog}/Command/DeleteUserCommand.php | 8 ++++---- .../Blog}/Command/ListUsersCommand.php | 6 +++--- .../Blog}/Controller/Admin/BlogController.php | 12 ++++++------ .../Blog}/Controller/BlogController.php | 18 +++++++++--------- .../Blog}/DataFixtures/AppFixtures.php | 10 +++++----- src/{ => Core/Blog}/Entity/Comment.php | 3 ++- src/{ => Core/Blog}/Entity/Post.php | 5 +++-- src/{ => Core/Blog}/Entity/Tag.php | 2 +- .../Blog}/Event/CommentCreatedEvent.php | 4 ++-- .../CheckRequirementsSubscriber.php | 2 +- .../CommentNotificationSubscriber.php | 8 ++++---- .../EventSubscriber/ControllerSubscriber.php | 4 ++-- .../RedirectToPreferredLocaleSubscriber.php | 2 +- src/{ => Core/Blog}/Form/CommentType.php | 4 ++-- .../TagArrayToStringTransformer.php | 6 +++--- src/{ => Core/Blog}/Form/PostType.php | 8 ++++---- .../Blog}/Form/Type/DateTimePickerType.php | 2 +- .../Blog}/Form/Type/TagsInputType.php | 6 +++--- src/{ => Core/Blog}/Pagination/Paginator.php | 2 +- .../Blog}/Repository/PostRepository.php | 8 ++++---- .../Blog}/Repository/TagRepository.php | 4 ++-- src/{ => Core/Blog}/Security/PostVoter.php | 6 +++--- src/{ => Core/Blog}/Twig/AppExtension.php | 2 +- .../Twig/Components/BlogSearchComponent.php | 6 +++--- .../Blog}/Twig/SourceCodeExtension.php | 2 +- .../Controller/SecurityController.php | 4 ++-- .../Security}/Controller/UserController.php | 8 ++++---- src/{ => Core/Security}/Entity/User.php | 4 ++-- .../Security}/Form/ChangePasswordType.php | 4 ++-- src/{ => Core/Security}/Form/UserType.php | 4 ++-- .../Security}/Repository/UserRepository.php | 4 ++-- src/{ => Shared}/Utils/Validator.php | 2 +- tests/Command/AddUserCommandTest.php | 4 ++-- tests/Command/ListUsersCommandTest.php | 2 +- tests/Controller/Admin/BlogControllerTest.php | 10 +++++----- tests/Controller/BlogControllerTest.php | 6 +++--- tests/Controller/DefaultControllerTest.php | 2 +- tests/Controller/UserControllerTest.php | 4 ++-- .../TagArrayToStringTransformerTest.php | 6 +++--- tests/Utils/ValidatorTest.php | 2 +- 42 files changed, 109 insertions(+), 106 deletions(-) rename src/{ => Core/Blog}/Command/AddUserCommand.php (98%) rename src/{ => Core/Blog}/Command/DeleteUserCommand.php (96%) rename src/{ => Core/Blog}/Command/ListUsersCommand.php (97%) rename src/{ => Core/Blog}/Controller/Admin/BlogController.php (96%) rename src/{ => Core/Blog}/Controller/BlogController.php (95%) rename src/{ => Core/Blog}/DataFixtures/AppFixtures.php (98%) rename src/{ => Core/Blog}/Entity/Comment.php (97%) rename src/{ => Core/Blog}/Entity/Post.php (97%) rename src/{ => Core/Blog}/Entity/Tag.php (97%) rename src/{ => Core/Blog}/Event/CommentCreatedEvent.php (88%) rename src/{ => Core/Blog}/EventSubscriber/CheckRequirementsSubscriber.php (99%) rename src/{ => Core/Blog}/EventSubscriber/CommentNotificationSubscriber.php (94%) rename src/{ => Core/Blog}/EventSubscriber/ControllerSubscriber.php (94%) rename src/{ => Core/Blog}/EventSubscriber/RedirectToPreferredLocaleSubscriber.php (98%) rename src/{ => Core/Blog}/Form/CommentType.php (96%) rename src/{ => Core/Blog}/Form/DataTransformer/TagArrayToStringTransformer.php (95%) rename src/{ => Core/Blog}/Form/PostType.php (95%) rename src/{ => Core/Blog}/Form/Type/DateTimePickerType.php (98%) rename src/{ => Core/Blog}/Form/Type/TagsInputType.php (92%) rename src/{ => Core/Blog}/Pagination/Paginator.php (98%) rename src/{ => Core/Blog}/Repository/PostRepository.php (95%) rename src/{ => Core/Blog}/Repository/TagRepository.php (93%) rename src/{ => Core/Blog}/Security/PostVoter.php (94%) rename src/{ => Core/Blog}/Twig/AppExtension.php (98%) rename src/{ => Core/Blog}/Twig/Components/BlogSearchComponent.php (92%) rename src/{ => Core/Blog}/Twig/SourceCodeExtension.php (99%) rename src/{ => Core/Security}/Controller/SecurityController.php (96%) rename src/{ => Core/Security}/Controller/UserController.php (94%) rename src/{ => Core/Security}/Entity/User.php (98%) rename src/{ => Core/Security}/Form/ChangePasswordType.php (96%) rename src/{ => Core/Security}/Form/UserType.php (96%) rename src/{ => Core/Security}/Repository/UserRepository.php (93%) rename src/{ => Shared}/Utils/Validator.php (98%) diff --git a/.gitignore b/.gitignore index c51e38625..3cf43c44d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.idea /public/build/fonts/glyphicons-* /public/build/images/glyphicons-* diff --git a/src/Command/AddUserCommand.php b/src/Core/Blog/Command/AddUserCommand.php similarity index 98% rename from src/Command/AddUserCommand.php rename to src/Core/Blog/Command/AddUserCommand.php index 2e642ce87..d54b11867 100644 --- a/src/Command/AddUserCommand.php +++ b/src/Core/Blog/Command/AddUserCommand.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace App\Command; +namespace App\Core\Blog\Command; -use App\Entity\User; -use App\Repository\UserRepository; -use App\Utils\Validator; +use App\Core\Security\Entity\User; +use App\Core\Security\Repository\UserRepository; +use App\Shared\Utils\Validator; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; diff --git a/src/Command/DeleteUserCommand.php b/src/Core/Blog/Command/DeleteUserCommand.php similarity index 96% rename from src/Command/DeleteUserCommand.php rename to src/Core/Blog/Command/DeleteUserCommand.php index d966c54a1..74f3567ee 100644 --- a/src/Command/DeleteUserCommand.php +++ b/src/Core/Blog/Command/DeleteUserCommand.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace App\Command; +namespace App\Core\Blog\Command; -use App\Entity\User; -use App\Repository\UserRepository; -use App\Utils\Validator; +use App\Core\Security\Entity\User; +use App\Core\Security\Repository\UserRepository; +use App\Shared\Utils\Validator; use Doctrine\ORM\EntityManagerInterface; use Psr\Log\LoggerInterface; use Symfony\Component\Console\Attribute\AsCommand; diff --git a/src/Command/ListUsersCommand.php b/src/Core/Blog/Command/ListUsersCommand.php similarity index 97% rename from src/Command/ListUsersCommand.php rename to src/Core/Blog/Command/ListUsersCommand.php index 0ac76457b..e36357539 100644 --- a/src/Command/ListUsersCommand.php +++ b/src/Core/Blog/Command/ListUsersCommand.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace App\Command; +namespace App\Core\Blog\Command; -use App\Entity\User; -use App\Repository\UserRepository; +use App\Core\Security\Entity\User; +use App\Core\Security\Repository\UserRepository; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; diff --git a/src/Controller/Admin/BlogController.php b/src/Core/Blog/Controller/Admin/BlogController.php similarity index 96% rename from src/Controller/Admin/BlogController.php rename to src/Core/Blog/Controller/Admin/BlogController.php index 5fb00c7e1..c604b9e14 100644 --- a/src/Controller/Admin/BlogController.php +++ b/src/Core/Blog/Controller/Admin/BlogController.php @@ -9,13 +9,13 @@ * file that was distributed with this source code. */ -namespace App\Controller\Admin; +namespace App\Core\Blog\Controller\Admin; -use App\Entity\Post; -use App\Entity\User; -use App\Form\PostType; -use App\Repository\PostRepository; -use App\Security\PostVoter; +use App\Core\Blog\Entity\Post; +use App\Core\Blog\Form\PostType; +use App\Core\Blog\Repository\PostRepository; +use App\Core\Blog\Security\PostVoter; +use App\Core\Security\Entity\User; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\Extension\Core\Type\SubmitType; diff --git a/src/Controller/BlogController.php b/src/Core/Blog/Controller/BlogController.php similarity index 95% rename from src/Controller/BlogController.php rename to src/Core/Blog/Controller/BlogController.php index 4b3d99147..f9f142b85 100644 --- a/src/Controller/BlogController.php +++ b/src/Core/Blog/Controller/BlogController.php @@ -9,15 +9,15 @@ * file that was distributed with this source code. */ -namespace App\Controller; - -use App\Entity\Comment; -use App\Entity\Post; -use App\Entity\User; -use App\Event\CommentCreatedEvent; -use App\Form\CommentType; -use App\Repository\PostRepository; -use App\Repository\TagRepository; +namespace App\Core\Blog\Controller; + +use App\Core\Blog\Entity\Comment; +use App\Core\Blog\Entity\Post; +use App\Core\Blog\Event\CommentCreatedEvent; +use App\Core\Blog\Form\CommentType; +use App\Core\Blog\Repository\PostRepository; +use App\Core\Blog\Repository\TagRepository; +use App\Core\Security\Entity\User; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bridge\Doctrine\Attribute\MapEntity; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; diff --git a/src/DataFixtures/AppFixtures.php b/src/Core/Blog/DataFixtures/AppFixtures.php similarity index 98% rename from src/DataFixtures/AppFixtures.php rename to src/Core/Blog/DataFixtures/AppFixtures.php index 319df2530..54a6bd65f 100644 --- a/src/DataFixtures/AppFixtures.php +++ b/src/Core/Blog/DataFixtures/AppFixtures.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace App\DataFixtures; +namespace App\Core\Blog\DataFixtures; -use App\Entity\Comment; -use App\Entity\Post; -use App\Entity\Tag; -use App\Entity\User; +use App\Core\Blog\Entity\Comment; +use App\Core\Blog\Entity\Post; +use App\Core\Blog\Entity\Tag; +use App\Core\Security\Entity\User; use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Persistence\ObjectManager; use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; diff --git a/src/Entity/Comment.php b/src/Core/Blog/Entity/Comment.php similarity index 97% rename from src/Entity/Comment.php rename to src/Core/Blog/Entity/Comment.php index aa1b8e6bc..afd839a05 100644 --- a/src/Entity/Comment.php +++ b/src/Core/Blog/Entity/Comment.php @@ -9,8 +9,9 @@ * file that was distributed with this source code. */ -namespace App\Entity; +namespace App\Core\Blog\Entity; +use App\Core\Security\Entity\User; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; diff --git a/src/Entity/Post.php b/src/Core/Blog/Entity/Post.php similarity index 97% rename from src/Entity/Post.php rename to src/Core/Blog/Entity/Post.php index 4682e9825..84c066bd4 100644 --- a/src/Entity/Post.php +++ b/src/Core/Blog/Entity/Post.php @@ -9,9 +9,10 @@ * file that was distributed with this source code. */ -namespace App\Entity; +namespace App\Core\Blog\Entity; -use App\Repository\PostRepository; +use App\Core\Blog\Repository\PostRepository; +use App\Core\Security\Entity\User; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\DBAL\Types\Types; diff --git a/src/Entity/Tag.php b/src/Core/Blog/Entity/Tag.php similarity index 97% rename from src/Entity/Tag.php rename to src/Core/Blog/Entity/Tag.php index 0979290f4..fb2c848ee 100644 --- a/src/Entity/Tag.php +++ b/src/Core/Blog/Entity/Tag.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace App\Entity; +namespace App\Core\Blog\Entity; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Event/CommentCreatedEvent.php b/src/Core/Blog/Event/CommentCreatedEvent.php similarity index 88% rename from src/Event/CommentCreatedEvent.php rename to src/Core/Blog/Event/CommentCreatedEvent.php index f8d74cb1c..5d22d7670 100644 --- a/src/Event/CommentCreatedEvent.php +++ b/src/Core/Blog/Event/CommentCreatedEvent.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace App\Event; +namespace App\Core\Blog\Event; -use App\Entity\Comment; +use App\Core\Blog\Entity\Comment; use Symfony\Contracts\EventDispatcher\Event; final class CommentCreatedEvent extends Event diff --git a/src/EventSubscriber/CheckRequirementsSubscriber.php b/src/Core/Blog/EventSubscriber/CheckRequirementsSubscriber.php similarity index 99% rename from src/EventSubscriber/CheckRequirementsSubscriber.php rename to src/Core/Blog/EventSubscriber/CheckRequirementsSubscriber.php index cdeed0275..30136c79c 100644 --- a/src/EventSubscriber/CheckRequirementsSubscriber.php +++ b/src/Core/Blog/EventSubscriber/CheckRequirementsSubscriber.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace App\EventSubscriber; +namespace App\Core\Blog\EventSubscriber; use Doctrine\DBAL\Exception\DriverException; use Doctrine\DBAL\Platforms\SQLitePlatform; diff --git a/src/EventSubscriber/CommentNotificationSubscriber.php b/src/Core/Blog/EventSubscriber/CommentNotificationSubscriber.php similarity index 94% rename from src/EventSubscriber/CommentNotificationSubscriber.php rename to src/Core/Blog/EventSubscriber/CommentNotificationSubscriber.php index 842abff42..92640ca71 100644 --- a/src/EventSubscriber/CommentNotificationSubscriber.php +++ b/src/Core/Blog/EventSubscriber/CommentNotificationSubscriber.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace App\EventSubscriber; +namespace App\Core\Blog\EventSubscriber; -use App\Entity\Post; -use App\Entity\User; -use App\Event\CommentCreatedEvent; +use App\Core\Blog\Entity\Post; +use App\Core\Blog\Event\CommentCreatedEvent; +use App\Core\Security\Entity\User; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Mailer\MailerInterface; diff --git a/src/EventSubscriber/ControllerSubscriber.php b/src/Core/Blog/EventSubscriber/ControllerSubscriber.php similarity index 94% rename from src/EventSubscriber/ControllerSubscriber.php rename to src/Core/Blog/EventSubscriber/ControllerSubscriber.php index 5fc857410..df9474957 100644 --- a/src/EventSubscriber/ControllerSubscriber.php +++ b/src/Core/Blog/EventSubscriber/ControllerSubscriber.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace App\EventSubscriber; +namespace App\Core\Blog\EventSubscriber; -use App\Twig\SourceCodeExtension; +use App\Core\Blog\Twig\SourceCodeExtension; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\Event\ControllerEvent; use Symfony\Component\HttpKernel\KernelEvents; diff --git a/src/EventSubscriber/RedirectToPreferredLocaleSubscriber.php b/src/Core/Blog/EventSubscriber/RedirectToPreferredLocaleSubscriber.php similarity index 98% rename from src/EventSubscriber/RedirectToPreferredLocaleSubscriber.php rename to src/Core/Blog/EventSubscriber/RedirectToPreferredLocaleSubscriber.php index 5e6894794..b47cbc74f 100644 --- a/src/EventSubscriber/RedirectToPreferredLocaleSubscriber.php +++ b/src/Core/Blog/EventSubscriber/RedirectToPreferredLocaleSubscriber.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace App\EventSubscriber; +namespace App\Core\Blog\EventSubscriber; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\RedirectResponse; diff --git a/src/Form/CommentType.php b/src/Core/Blog/Form/CommentType.php similarity index 96% rename from src/Form/CommentType.php rename to src/Core/Blog/Form/CommentType.php index 72e61154f..01be1dadc 100644 --- a/src/Form/CommentType.php +++ b/src/Core/Blog/Form/CommentType.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace App\Form; +namespace App\Core\Blog\Form; -use App\Entity\Comment; +use App\Core\Blog\Entity\Comment; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\FormBuilderInterface; diff --git a/src/Form/DataTransformer/TagArrayToStringTransformer.php b/src/Core/Blog/Form/DataTransformer/TagArrayToStringTransformer.php similarity index 95% rename from src/Form/DataTransformer/TagArrayToStringTransformer.php rename to src/Core/Blog/Form/DataTransformer/TagArrayToStringTransformer.php index b98be0a5c..3833877e7 100644 --- a/src/Form/DataTransformer/TagArrayToStringTransformer.php +++ b/src/Core/Blog/Form/DataTransformer/TagArrayToStringTransformer.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace App\Form\DataTransformer; +namespace App\Core\Blog\Form\DataTransformer; -use App\Entity\Tag; -use App\Repository\TagRepository; +use App\Core\Blog\Entity\Tag; +use App\Core\Blog\Repository\TagRepository; use Symfony\Component\Form\DataTransformerInterface; use function Symfony\Component\String\u; diff --git a/src/Form/PostType.php b/src/Core/Blog/Form/PostType.php similarity index 95% rename from src/Form/PostType.php rename to src/Core/Blog/Form/PostType.php index 91b27dafb..89b69a61e 100644 --- a/src/Form/PostType.php +++ b/src/Core/Blog/Form/PostType.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace App\Form; +namespace App\Core\Blog\Form; -use App\Entity\Post; -use App\Form\Type\DateTimePickerType; -use App\Form\Type\TagsInputType; +use App\Core\Blog\Entity\Post; +use App\Core\Blog\Form\Type\DateTimePickerType; +use App\Core\Blog\Form\Type\TagsInputType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\FormBuilderInterface; diff --git a/src/Form/Type/DateTimePickerType.php b/src/Core/Blog/Form/Type/DateTimePickerType.php similarity index 98% rename from src/Form/Type/DateTimePickerType.php rename to src/Core/Blog/Form/Type/DateTimePickerType.php index 2400ec1eb..33d251e5b 100644 --- a/src/Form/Type/DateTimePickerType.php +++ b/src/Core/Blog/Form/Type/DateTimePickerType.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace App\Form\Type; +namespace App\Core\Blog\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\DateTimeType; diff --git a/src/Form/Type/TagsInputType.php b/src/Core/Blog/Form/Type/TagsInputType.php similarity index 92% rename from src/Form/Type/TagsInputType.php rename to src/Core/Blog/Form/Type/TagsInputType.php index abd75e4de..0914ae868 100644 --- a/src/Form/Type/TagsInputType.php +++ b/src/Core/Blog/Form/Type/TagsInputType.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace App\Form\Type; +namespace App\Core\Blog\Form\Type; -use App\Form\DataTransformer\TagArrayToStringTransformer; -use App\Repository\TagRepository; +use App\Core\Blog\Form\DataTransformer\TagArrayToStringTransformer; +use App\Core\Blog\Repository\TagRepository; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\TextType; diff --git a/src/Pagination/Paginator.php b/src/Core/Blog/Pagination/Paginator.php similarity index 98% rename from src/Pagination/Paginator.php rename to src/Core/Blog/Pagination/Paginator.php index f745bbd17..068dd0751 100644 --- a/src/Pagination/Paginator.php +++ b/src/Core/Blog/Pagination/Paginator.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace App\Pagination; +namespace App\Core\Blog\Pagination; use Doctrine\ORM\QueryBuilder as DoctrineQueryBuilder; use Doctrine\ORM\Tools\Pagination\CountWalker; diff --git a/src/Repository/PostRepository.php b/src/Core/Blog/Repository/PostRepository.php similarity index 95% rename from src/Repository/PostRepository.php rename to src/Core/Blog/Repository/PostRepository.php index 62b026cda..db3b84cf2 100644 --- a/src/Repository/PostRepository.php +++ b/src/Core/Blog/Repository/PostRepository.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace App\Repository; +namespace App\Core\Blog\Repository; -use App\Entity\Post; -use App\Entity\Tag; -use App\Pagination\Paginator; +use App\Core\Blog\Entity\Post; +use App\Core\Blog\Entity\Tag; +use App\Core\Blog\Pagination\Paginator; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; use function Symfony\Component\String\u; diff --git a/src/Repository/TagRepository.php b/src/Core/Blog/Repository/TagRepository.php similarity index 93% rename from src/Repository/TagRepository.php rename to src/Core/Blog/Repository/TagRepository.php index 976a1bdcc..9c1945bba 100644 --- a/src/Repository/TagRepository.php +++ b/src/Core/Blog/Repository/TagRepository.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace App\Repository; +namespace App\Core\Blog\Repository; -use App\Entity\Tag; +use App\Core\Blog\Entity\Tag; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; diff --git a/src/Security/PostVoter.php b/src/Core/Blog/Security/PostVoter.php similarity index 94% rename from src/Security/PostVoter.php rename to src/Core/Blog/Security/PostVoter.php index b799651b5..0c846a8e6 100644 --- a/src/Security/PostVoter.php +++ b/src/Core/Blog/Security/PostVoter.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace App\Security; +namespace App\Core\Blog\Security; -use App\Entity\Post; -use App\Entity\User; +use App\Core\Blog\Entity\Post; +use App\Core\Security\Entity\User; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authorization\Voter\Voter; diff --git a/src/Twig/AppExtension.php b/src/Core/Blog/Twig/AppExtension.php similarity index 98% rename from src/Twig/AppExtension.php rename to src/Core/Blog/Twig/AppExtension.php index f37967721..f14acafa9 100644 --- a/src/Twig/AppExtension.php +++ b/src/Core/Blog/Twig/AppExtension.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace App\Twig; +namespace App\Core\Blog\Twig; use Symfony\Component\Intl\Locales; use Twig\Extension\AbstractExtension; diff --git a/src/Twig/Components/BlogSearchComponent.php b/src/Core/Blog/Twig/Components/BlogSearchComponent.php similarity index 92% rename from src/Twig/Components/BlogSearchComponent.php rename to src/Core/Blog/Twig/Components/BlogSearchComponent.php index 7f14cf8c2..105a65d64 100644 --- a/src/Twig/Components/BlogSearchComponent.php +++ b/src/Core/Blog/Twig/Components/BlogSearchComponent.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace App\Twig\Components; +namespace App\Core\Blog\Twig\Components; -use App\Entity\Post; -use App\Repository\PostRepository; +use App\Core\Blog\Entity\Post; +use App\Core\Blog\Repository\PostRepository; use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveProp; use Symfony\UX\LiveComponent\DefaultActionTrait; diff --git a/src/Twig/SourceCodeExtension.php b/src/Core/Blog/Twig/SourceCodeExtension.php similarity index 99% rename from src/Twig/SourceCodeExtension.php rename to src/Core/Blog/Twig/SourceCodeExtension.php index 415fd0fa1..9b3c37ec8 100644 --- a/src/Twig/SourceCodeExtension.php +++ b/src/Core/Blog/Twig/SourceCodeExtension.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace App\Twig; +namespace App\Core\Blog\Twig; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter; diff --git a/src/Controller/SecurityController.php b/src/Core/Security/Controller/SecurityController.php similarity index 96% rename from src/Controller/SecurityController.php rename to src/Core/Security/Controller/SecurityController.php index 06104fd66..bf56b1153 100644 --- a/src/Controller/SecurityController.php +++ b/src/Core/Security/Controller/SecurityController.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace App\Controller; +namespace App\Core\Security\Controller; -use App\Entity\User; +use App\Core\Security\Entity\User; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Controller/UserController.php b/src/Core/Security/Controller/UserController.php similarity index 94% rename from src/Controller/UserController.php rename to src/Core/Security/Controller/UserController.php index d73acdd59..aa171b9ec 100644 --- a/src/Controller/UserController.php +++ b/src/Core/Security/Controller/UserController.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace App\Controller; +namespace App\Core\Security\Controller; -use App\Entity\User; -use App\Form\ChangePasswordType; -use App\Form\UserType; +use App\Core\Security\Entity\User; +use App\Core\Security\Form\ChangePasswordType; +use App\Core\Security\Form\UserType; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\SecurityBundle\Security; diff --git a/src/Entity/User.php b/src/Core/Security/Entity/User.php similarity index 98% rename from src/Entity/User.php rename to src/Core/Security/Entity/User.php index 547ee659f..8c0cbaeb8 100644 --- a/src/Entity/User.php +++ b/src/Core/Security/Entity/User.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace App\Entity; +namespace App\Core\Security\Entity; -use App\Repository\UserRepository; +use App\Core\Security\Repository\UserRepository; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; diff --git a/src/Form/ChangePasswordType.php b/src/Core/Security/Form/ChangePasswordType.php similarity index 96% rename from src/Form/ChangePasswordType.php rename to src/Core/Security/Form/ChangePasswordType.php index f3eb36ed8..51f8fe424 100644 --- a/src/Form/ChangePasswordType.php +++ b/src/Core/Security/Form/ChangePasswordType.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace App\Form; +namespace App\Core\Security\Form; -use App\Entity\User; +use App\Core\Security\Entity\User; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\PasswordType; use Symfony\Component\Form\Extension\Core\Type\RepeatedType; diff --git a/src/Form/UserType.php b/src/Core/Security/Form/UserType.php similarity index 96% rename from src/Form/UserType.php rename to src/Core/Security/Form/UserType.php index 51f672f66..4271a35d5 100644 --- a/src/Form/UserType.php +++ b/src/Core/Security/Form/UserType.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace App\Form; +namespace App\Core\Security\Form; -use App\Entity\User; +use App\Core\Security\Entity\User; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\Extension\Core\Type\TextType; diff --git a/src/Repository/UserRepository.php b/src/Core/Security/Repository/UserRepository.php similarity index 93% rename from src/Repository/UserRepository.php rename to src/Core/Security/Repository/UserRepository.php index e7a70ff07..e3649c253 100644 --- a/src/Repository/UserRepository.php +++ b/src/Core/Security/Repository/UserRepository.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace App\Repository; +namespace App\Core\Security\Repository; -use App\Entity\User; +use App\Core\Security\Entity\User; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; diff --git a/src/Utils/Validator.php b/src/Shared/Utils/Validator.php similarity index 98% rename from src/Utils/Validator.php rename to src/Shared/Utils/Validator.php index def71a2a0..fe7a08116 100644 --- a/src/Utils/Validator.php +++ b/src/Shared/Utils/Validator.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace App\Utils; +namespace App\Shared\Utils; use Symfony\Component\Console\Exception\InvalidArgumentException; use function Symfony\Component\String\u; diff --git a/tests/Command/AddUserCommandTest.php b/tests/Command/AddUserCommandTest.php index 240c2497e..1b51d8da5 100644 --- a/tests/Command/AddUserCommandTest.php +++ b/tests/Command/AddUserCommandTest.php @@ -11,8 +11,8 @@ namespace App\Tests\Command; -use App\Command\AddUserCommand; -use App\Repository\UserRepository; +use App\Core\Blog\Command\AddUserCommand; +use App\Core\Security\Repository\UserRepository; use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; final class AddUserCommandTest extends AbstractCommandTest diff --git a/tests/Command/ListUsersCommandTest.php b/tests/Command/ListUsersCommandTest.php index 78fb50951..e96affdd7 100644 --- a/tests/Command/ListUsersCommandTest.php +++ b/tests/Command/ListUsersCommandTest.php @@ -11,7 +11,7 @@ namespace App\Tests\Command; -use App\Command\ListUsersCommand; +use App\Core\Blog\Command\ListUsersCommand; final class ListUsersCommandTest extends AbstractCommandTest { diff --git a/tests/Controller/Admin/BlogControllerTest.php b/tests/Controller/Admin/BlogControllerTest.php index 7f3618da2..995401154 100644 --- a/tests/Controller/Admin/BlogControllerTest.php +++ b/tests/Controller/Admin/BlogControllerTest.php @@ -11,9 +11,9 @@ namespace App\Tests\Controller\Admin; -use App\Entity\User; -use App\Repository\PostRepository; -use App\Repository\UserRepository; +use App\Core\Blog\Repository\PostRepository; +use App\Core\Security\Entity\User; +use App\Core\Security\Repository\UserRepository; use Symfony\Bundle\FrameworkBundle\KernelBrowser; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\HttpFoundation\Response; @@ -110,7 +110,7 @@ public function testAdminNewPost(): void /** @var PostRepository $postRepository */ $postRepository = static::getContainer()->get(PostRepository::class); - /** @var \App\Entity\Post $post */ + /** @var \App\Core\Blog\Entity\Post $post */ $post = $postRepository->findOneByTitle($postTitle); $this->assertNotNull($post); @@ -166,7 +166,7 @@ public function testAdminEditPost(): void /** @var PostRepository $postRepository */ $postRepository = static::getContainer()->get(PostRepository::class); - /** @var \App\Entity\Post $post */ + /** @var \App\Core\Blog\Entity\Post $post */ $post = $postRepository->find(1); $this->assertSame($newBlogPostTitle, $post->getTitle()); diff --git a/tests/Controller/BlogControllerTest.php b/tests/Controller/BlogControllerTest.php index e20f649fe..88068c4ea 100644 --- a/tests/Controller/BlogControllerTest.php +++ b/tests/Controller/BlogControllerTest.php @@ -11,9 +11,9 @@ namespace App\Tests\Controller; -use App\Entity\User; -use App\Pagination\Paginator; -use App\Repository\UserRepository; +use App\Core\Blog\Pagination\Paginator; +use App\Core\Security\Entity\User; +use App\Core\Security\Repository\UserRepository; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; /** diff --git a/tests/Controller/DefaultControllerTest.php b/tests/Controller/DefaultControllerTest.php index 804832f3a..a670c0b94 100644 --- a/tests/Controller/DefaultControllerTest.php +++ b/tests/Controller/DefaultControllerTest.php @@ -11,7 +11,7 @@ namespace App\Tests\Controller; -use App\Entity\Post; +use App\Core\Blog\Entity\Post; use Doctrine\Bundle\DoctrineBundle\Registry; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\HttpFoundation\Response; diff --git a/tests/Controller/UserControllerTest.php b/tests/Controller/UserControllerTest.php index d65d905a1..72cfd85be 100644 --- a/tests/Controller/UserControllerTest.php +++ b/tests/Controller/UserControllerTest.php @@ -11,8 +11,8 @@ namespace App\Tests\Controller; -use App\Entity\User; -use App\Repository\UserRepository; +use App\Core\Security\Entity\User; +use App\Core\Security\Repository\UserRepository; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\HttpFoundation\Response; diff --git a/tests/Form/DataTransformer/TagArrayToStringTransformerTest.php b/tests/Form/DataTransformer/TagArrayToStringTransformerTest.php index b79f3c3f3..34b1f45f4 100644 --- a/tests/Form/DataTransformer/TagArrayToStringTransformerTest.php +++ b/tests/Form/DataTransformer/TagArrayToStringTransformerTest.php @@ -11,9 +11,9 @@ namespace App\Tests\Form\DataTransformer; -use App\Entity\Tag; -use App\Form\DataTransformer\TagArrayToStringTransformer; -use App\Repository\TagRepository; +use App\Core\Blog\Entity\Tag; +use App\Core\Blog\Form\DataTransformer\TagArrayToStringTransformer; +use App\Core\Blog\Repository\TagRepository; use PHPUnit\Framework\TestCase; /** diff --git a/tests/Utils/ValidatorTest.php b/tests/Utils/ValidatorTest.php index fca00baf4..713ed18f9 100644 --- a/tests/Utils/ValidatorTest.php +++ b/tests/Utils/ValidatorTest.php @@ -11,7 +11,7 @@ namespace App\Tests\Utils; -use App\Utils\Validator; +use App\Shared\Utils\Validator; use PHPUnit\Framework\TestCase; final class ValidatorTest extends TestCase