From 2190174754832e7f4a5afe19de8b259c0bb2ba29 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 25 Dec 2023 18:50:29 +0100 Subject: [PATCH] Move Annotation entity to Core --- src/Wallabag/AnnotationBundle/Form/NewAnnotationType.php | 2 +- .../AnnotationBundle/Repository/AnnotationRepository.php | 4 ++-- .../ApiBundle/Controller/AnnotationRestController.php | 2 +- src/Wallabag/CoreBundle/Controller/AnnotationController.php | 2 +- src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php | 2 +- .../{AnnotationBundle => CoreBundle}/Entity/Annotation.php | 3 +-- src/Wallabag/CoreBundle/Entity/Entry.php | 3 +-- .../CoreBundle/Controller/AnnotationControllerTest.php | 2 +- tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php | 2 +- tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 2 +- 10 files changed, 11 insertions(+), 13 deletions(-) rename src/Wallabag/{AnnotationBundle => CoreBundle}/Entity/Annotation.php (98%) diff --git a/src/Wallabag/AnnotationBundle/Form/NewAnnotationType.php b/src/Wallabag/AnnotationBundle/Form/NewAnnotationType.php index 48bc2c59d..4035fc6f7 100644 --- a/src/Wallabag/AnnotationBundle/Form/NewAnnotationType.php +++ b/src/Wallabag/AnnotationBundle/Form/NewAnnotationType.php @@ -6,7 +6,7 @@ use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CollectionType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; -use Wallabag\AnnotationBundle\Entity\Annotation; +use Wallabag\CoreBundle\Entity\Annotation; class NewAnnotationType extends AbstractType { diff --git a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php index cab728027..a95900723 100644 --- a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php +++ b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php @@ -5,7 +5,7 @@ namespace Wallabag\AnnotationBundle\Repository; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\ORM\QueryBuilder; use Doctrine\Persistence\ManagerRegistry; -use Wallabag\AnnotationBundle\Entity\Annotation; +use Wallabag\CoreBundle\Entity\Annotation; /** * AnnotationRepository. @@ -130,7 +130,7 @@ class AnnotationRepository extends ServiceEntityRepository public function removeAllByUserId($userId) { $this->getEntityManager() - ->createQuery('DELETE FROM Wallabag\AnnotationBundle\Entity\Annotation a WHERE a.user = :userId') + ->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Annotation a WHERE a.user = :userId') ->setParameter('userId', $userId) ->execute(); } diff --git a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php b/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php index b55e8fcf9..63a3857e5 100644 --- a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php +++ b/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php @@ -7,7 +7,7 @@ use OpenApi\Annotations as OA; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; -use Wallabag\AnnotationBundle\Entity\Annotation; +use Wallabag\CoreBundle\Entity\Annotation; use Wallabag\CoreBundle\Entity\Entry; class AnnotationRestController extends WallabagRestController diff --git a/src/Wallabag/CoreBundle/Controller/AnnotationController.php b/src/Wallabag/CoreBundle/Controller/AnnotationController.php index 0cb199f27..ad31446b7 100644 --- a/src/Wallabag/CoreBundle/Controller/AnnotationController.php +++ b/src/Wallabag/CoreBundle/Controller/AnnotationController.php @@ -10,10 +10,10 @@ use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Routing\Annotation\Route; -use Wallabag\AnnotationBundle\Entity\Annotation; use Wallabag\AnnotationBundle\Form\EditAnnotationType; use Wallabag\AnnotationBundle\Form\NewAnnotationType; use Wallabag\AnnotationBundle\Repository\AnnotationRepository; +use Wallabag\CoreBundle\Entity\Annotation; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\UserBundle\Entity\User; diff --git a/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php index 4b1c34208..2f4db5adc 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php @@ -5,7 +5,7 @@ namespace Wallabag\CoreBundle\DataFixtures; use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Common\DataFixtures\DependentFixtureInterface; use Doctrine\Persistence\ObjectManager; -use Wallabag\AnnotationBundle\Entity\Annotation; +use Wallabag\CoreBundle\Entity\Annotation; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\UserBundle\DataFixtures\UserFixtures; use Wallabag\UserBundle\Entity\User; diff --git a/src/Wallabag/AnnotationBundle/Entity/Annotation.php b/src/Wallabag/CoreBundle/Entity/Annotation.php similarity index 98% rename from src/Wallabag/AnnotationBundle/Entity/Annotation.php rename to src/Wallabag/CoreBundle/Entity/Annotation.php index a180d5047..6b1a903c7 100644 --- a/src/Wallabag/AnnotationBundle/Entity/Annotation.php +++ b/src/Wallabag/CoreBundle/Entity/Annotation.php @@ -1,6 +1,6 @@