From 2ed8c219cc2c0418193a8ef4a1988f9c8275df14 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 25 Dec 2023 18:37:15 +0100 Subject: [PATCH 01/38] Move Annotation controller to Core --- app/config/routing.yml | 5 -- app/config/services.yml | 4 -- phpstan-baseline.neon | 8 +-- .../Controller/AnnotationRestController.php | 8 +-- .../Controller/AnnotationController.php} | 4 +- .../WallabagAnnotationTestCase.php | 58 ------------------- .../Controller/AnnotationControllerTest.php | 21 ++++++- 7 files changed, 28 insertions(+), 80 deletions(-) rename src/Wallabag/{AnnotationBundle/Controller/WallabagAnnotationController.php => CoreBundle/Controller/AnnotationController.php} (97%) delete mode 100644 tests/Wallabag/AnnotationBundle/WallabagAnnotationTestCase.php rename tests/Wallabag/{AnnotationBundle => CoreBundle}/Controller/AnnotationControllerTest.php (96%) diff --git a/app/config/routing.yml b/app/config/routing.yml index 81fd63067..1a781dbce 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -1,8 +1,3 @@ -wallabag_annotation: - resource: "@WallabagAnnotationBundle/Controller/" - type: annotation - prefix: / - wallabag_import: resource: "@WallabagImportBundle/Controller/" type: annotation diff --git a/app/config/services.yml b/app/config/services.yml index 06faebfd2..8ce454d07 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -46,10 +46,6 @@ services: # controllers are imported separately to make sure services can be injected # as action arguments even if you don't extend any base controller class - Wallabag\AnnotationBundle\Controller\: - resource: '../../src/Wallabag/AnnotationBundle/Controller/' - tags: ['controller.service_arguments'] - Wallabag\ApiBundle\Controller\: resource: '../../src/Wallabag/ApiBundle/Controller/' tags: ['controller.service_arguments'] diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index bb6e3ac10..d3a0c1aec 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,14 +1,14 @@ parameters: ignoreErrors: - - message: "#^Method Wallabag\\\\AnnotationBundle\\\\Controller\\\\WallabagAnnotationController\\:\\:postAnnotationAction\\(\\) should return Symfony\\\\Component\\\\HttpFoundation\\\\JsonResponse but returns Symfony\\\\Component\\\\Form\\\\FormInterface\\\\.$#" + message: "#^Method Wallabag\\\\CoreBundle\\\\Controller\\\\AnnotationController\\:\\:postAnnotationAction\\(\\) should return Symfony\\\\Component\\\\HttpFoundation\\\\JsonResponse but returns Symfony\\\\Component\\\\Form\\\\FormInterface\\\\.$#" count: 1 - path: src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php + path: src/Wallabag/CoreBundle/Controller/AnnotationController.php - - message: "#^Method Wallabag\\\\AnnotationBundle\\\\Controller\\\\WallabagAnnotationController\\:\\:putAnnotationAction\\(\\) should return Symfony\\\\Component\\\\HttpFoundation\\\\JsonResponse but returns Symfony\\\\Component\\\\Form\\\\FormInterface\\\\.$#" + message: "#^Method Wallabag\\\\CoreBundle\\\\Controller\\\\AnnotationController\\:\\:putAnnotationAction\\(\\) should return Symfony\\\\Component\\\\HttpFoundation\\\\JsonResponse but returns Symfony\\\\Component\\\\Form\\\\FormInterface\\\\.$#" count: 1 - path: src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php + path: src/Wallabag/CoreBundle/Controller/AnnotationController.php - message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Entity\\\\RuleInterface\\:\\:getConfig\\(\\)\\.$#" diff --git a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php b/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php index ef57f4851..b55e8fcf9 100644 --- a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php +++ b/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php @@ -42,7 +42,7 @@ class AnnotationRestController extends WallabagRestController { $this->validateAuthentication(); - return $this->forward('Wallabag\AnnotationBundle\Controller\WallabagAnnotationController::getAnnotationsAction', [ + return $this->forward('Wallabag\CoreBundle\Controller\AnnotationController::getAnnotationsAction', [ 'entry' => $entry, ]); } @@ -108,7 +108,7 @@ class AnnotationRestController extends WallabagRestController { $this->validateAuthentication(); - return $this->forward('Wallabag\AnnotationBundle\Controller\WallabagAnnotationController::postAnnotationAction', [ + return $this->forward('Wallabag\CoreBundle\Controller\AnnotationController::postAnnotationAction', [ 'request' => $request, 'entry' => $entry, ]); @@ -144,7 +144,7 @@ class AnnotationRestController extends WallabagRestController { $this->validateAuthentication(); - return $this->forward('Wallabag\AnnotationBundle\Controller\WallabagAnnotationController::putAnnotationAction', [ + return $this->forward('Wallabag\CoreBundle\Controller\AnnotationController::putAnnotationAction', [ 'annotation' => $annotation, 'request' => $request, ]); @@ -180,7 +180,7 @@ class AnnotationRestController extends WallabagRestController { $this->validateAuthentication(); - return $this->forward('Wallabag\AnnotationBundle\Controller\WallabagAnnotationController::deleteAnnotationAction', [ + return $this->forward('Wallabag\CoreBundle\Controller\AnnotationController::deleteAnnotationAction', [ 'annotation' => $annotation, ]); } diff --git a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php b/src/Wallabag/CoreBundle/Controller/AnnotationController.php similarity index 97% rename from src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php rename to src/Wallabag/CoreBundle/Controller/AnnotationController.php index e5ffc6fdf..0cb199f27 100644 --- a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php +++ b/src/Wallabag/CoreBundle/Controller/AnnotationController.php @@ -1,6 +1,6 @@ client = $this->createAuthorizedClient(); - } - - public function logInAs($username) - { - $crawler = $this->client->request('GET', '/login'); - $form = $crawler->filter('button[type=submit]')->form(); - $data = [ - '_username' => $username, - '_password' => 'mypassword', - ]; - - $this->client->submit($form, $data); - } - - /** - * @return KernelBrowser - */ - protected function createAuthorizedClient() - { - $client = static::createClient(); - $container = $client->getContainer(); - - /** @var UserManager $userManager */ - $userManager = $container->get('fos_user.user_manager.test'); - $firewallName = $container->getParameter('fos_user.firewall_name'); - - $this->user = $userManager->findUserBy(['username' => 'admin']); - - $client->loginUser($this->user, $firewallName); - - return $client; - } -} diff --git a/tests/Wallabag/AnnotationBundle/Controller/AnnotationControllerTest.php b/tests/Wallabag/CoreBundle/Controller/AnnotationControllerTest.php similarity index 96% rename from tests/Wallabag/AnnotationBundle/Controller/AnnotationControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/AnnotationControllerTest.php index 90abf0235..97c6b08a1 100644 --- a/tests/Wallabag/AnnotationBundle/Controller/AnnotationControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/AnnotationControllerTest.php @@ -1,15 +1,30 @@ logInAs('admin'); + + $this->client = $this->getTestClient(); + } + /** * This data provider allow to tests annotation from the : * - API POV (when user use the api to manage annotations) From 1a6036cb2365665a8cc5435f926c18dda8e7134f Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 25 Dec 2023 18:42:36 +0100 Subject: [PATCH 02/38] Move Annotation fixtures to Core --- app/config/services_test.yml | 5 ----- .../DataFixtures/AnnotationFixtures.php | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) rename src/Wallabag/{AnnotationBundle => CoreBundle}/DataFixtures/AnnotationFixtures.php (94%) diff --git a/app/config/services_test.yml b/app/config/services_test.yml index 5073b64b9..781d5c770 100644 --- a/app/config/services_test.yml +++ b/app/config/services_test.yml @@ -31,8 +31,3 @@ services: resource: '../../src/Wallabag/CoreBundle/DataFixtures/*' tags: ['doctrine.fixture.orm'] autowire: true - - Wallabag\AnnotationBundle\DataFixtures\: - resource: '../../src/Wallabag/AnnotationBundle/DataFixtures/*' - tags: ['doctrine.fixture.orm'] - autowire: true diff --git a/src/Wallabag/AnnotationBundle/DataFixtures/AnnotationFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php similarity index 94% rename from src/Wallabag/AnnotationBundle/DataFixtures/AnnotationFixtures.php rename to src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php index a2de49e6a..4b1c34208 100644 --- a/src/Wallabag/AnnotationBundle/DataFixtures/AnnotationFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php @@ -1,12 +1,11 @@ Date: Mon, 25 Dec 2023 18:50:29 +0100 Subject: [PATCH 03/38] 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 @@ Date: Mon, 25 Dec 2023 19:17:46 +0100 Subject: [PATCH 04/38] Move Annotation repository to Core --- src/Wallabag/CoreBundle/Controller/AnnotationController.php | 2 +- src/Wallabag/CoreBundle/Controller/ConfigController.php | 2 +- src/Wallabag/CoreBundle/Entity/Annotation.php | 2 +- .../Repository/AnnotationRepository.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename src/Wallabag/{AnnotationBundle => CoreBundle}/Repository/AnnotationRepository.php (98%) diff --git a/src/Wallabag/CoreBundle/Controller/AnnotationController.php b/src/Wallabag/CoreBundle/Controller/AnnotationController.php index ad31446b7..d19d2d9d4 100644 --- a/src/Wallabag/CoreBundle/Controller/AnnotationController.php +++ b/src/Wallabag/CoreBundle/Controller/AnnotationController.php @@ -12,9 +12,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Routing\Annotation\Route; 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\CoreBundle\Repository\AnnotationRepository; use Wallabag\UserBundle\Entity\User; class AnnotationController extends AbstractFOSRestController diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 9d9605df5..bfd3ffdc1 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -20,7 +20,6 @@ use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Validator\Constraints\Locale as LocaleConstraint; use Symfony\Component\Validator\Validator\ValidatorInterface; -use Wallabag\AnnotationBundle\Repository\AnnotationRepository; use Wallabag\CoreBundle\Entity\Config as ConfigEntity; use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule; use Wallabag\CoreBundle\Entity\RuleInterface; @@ -34,6 +33,7 @@ use Wallabag\CoreBundle\Form\Type\TaggingRuleImportType; use Wallabag\CoreBundle\Form\Type\TaggingRuleType; use Wallabag\CoreBundle\Form\Type\UserInformationType; use Wallabag\CoreBundle\Helper\Redirect; +use Wallabag\CoreBundle\Repository\AnnotationRepository; use Wallabag\CoreBundle\Repository\ConfigRepository; use Wallabag\CoreBundle\Repository\EntryRepository; use Wallabag\CoreBundle\Repository\IgnoreOriginUserRuleRepository; diff --git a/src/Wallabag/CoreBundle/Entity/Annotation.php b/src/Wallabag/CoreBundle/Entity/Annotation.php index 6b1a903c7..a83a659ee 100644 --- a/src/Wallabag/CoreBundle/Entity/Annotation.php +++ b/src/Wallabag/CoreBundle/Entity/Annotation.php @@ -16,7 +16,7 @@ use Wallabag\UserBundle\Entity\User; * Annotation. * * @ORM\Table(name="annotation") - * @ORM\Entity(repositoryClass="Wallabag\AnnotationBundle\Repository\AnnotationRepository") + * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\AnnotationRepository") * @ORM\HasLifecycleCallbacks() * @ExclusionPolicy("none") */ diff --git a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php b/src/Wallabag/CoreBundle/Repository/AnnotationRepository.php similarity index 98% rename from src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php rename to src/Wallabag/CoreBundle/Repository/AnnotationRepository.php index a95900723..acd48fea4 100644 --- a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php +++ b/src/Wallabag/CoreBundle/Repository/AnnotationRepository.php @@ -1,6 +1,6 @@ Date: Mon, 25 Dec 2023 19:23:32 +0100 Subject: [PATCH 05/38] Move Annotation form types to Core --- src/Wallabag/CoreBundle/Controller/AnnotationController.php | 4 ++-- .../Form => CoreBundle/Form/Type}/EditAnnotationType.php | 2 +- .../Form => CoreBundle/Form/Type}/NewAnnotationType.php | 2 +- .../Form => CoreBundle/Form/Type}/RangeType.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/Wallabag/{AnnotationBundle/Form => CoreBundle/Form/Type}/EditAnnotationType.php (89%) rename src/Wallabag/{AnnotationBundle/Form => CoreBundle/Form/Type}/NewAnnotationType.php (95%) rename src/Wallabag/{AnnotationBundle/Form => CoreBundle/Form/Type}/RangeType.php (89%) diff --git a/src/Wallabag/CoreBundle/Controller/AnnotationController.php b/src/Wallabag/CoreBundle/Controller/AnnotationController.php index d19d2d9d4..c73ce26db 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\Form\EditAnnotationType; -use Wallabag\AnnotationBundle\Form\NewAnnotationType; use Wallabag\CoreBundle\Entity\Annotation; use Wallabag\CoreBundle\Entity\Entry; +use Wallabag\CoreBundle\Form\Type\EditAnnotationType; +use Wallabag\CoreBundle\Form\Type\NewAnnotationType; use Wallabag\CoreBundle\Repository\AnnotationRepository; use Wallabag\UserBundle\Entity\User; diff --git a/src/Wallabag/AnnotationBundle/Form/EditAnnotationType.php b/src/Wallabag/CoreBundle/Form/Type/EditAnnotationType.php similarity index 89% rename from src/Wallabag/AnnotationBundle/Form/EditAnnotationType.php rename to src/Wallabag/CoreBundle/Form/Type/EditAnnotationType.php index 3b587478d..cd6816437 100644 --- a/src/Wallabag/AnnotationBundle/Form/EditAnnotationType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EditAnnotationType.php @@ -1,6 +1,6 @@ Date: Mon, 25 Dec 2023 19:24:52 +0100 Subject: [PATCH 06/38] Remove AnnotationBundle --- app/AppKernel.php | 1 - app/config/services.yml | 4 ---- .../DependencyInjection/Configuration.php | 14 -------------- .../WallabagAnnotationExtension.php | 15 --------------- .../AnnotationBundle/WallabagAnnotationBundle.php | 9 --------- 5 files changed, 43 deletions(-) delete mode 100644 src/Wallabag/AnnotationBundle/DependencyInjection/Configuration.php delete mode 100644 src/Wallabag/AnnotationBundle/DependencyInjection/WallabagAnnotationExtension.php delete mode 100644 src/Wallabag/AnnotationBundle/WallabagAnnotationBundle.php diff --git a/app/AppKernel.php b/app/AppKernel.php index 9d942a2cd..30d035075 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -41,7 +41,6 @@ class AppKernel extends Kernel new Wallabag\ApiBundle\WallabagApiBundle(), new Wallabag\UserBundle\WallabagUserBundle(), new Wallabag\ImportBundle\WallabagImportBundle(), - new Wallabag\AnnotationBundle\WallabagAnnotationBundle(), ]; if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { diff --git a/app/config/services.yml b/app/config/services.yml index 8ce454d07..d65fa1d00 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -32,10 +32,6 @@ services: $supportUrl: '@=service(''craue_config'').get(''wallabag_support_url'')' $fonts: '%wallabag_core.fonts%' - Wallabag\AnnotationBundle\: - resource: '../../src/Wallabag/AnnotationBundle/*' - exclude: '../../src/Wallabag/AnnotationBundle/{Controller,Entity,DataFixtures}' - Wallabag\ApiBundle\: resource: '../../src/Wallabag/ApiBundle/*' exclude: '../../src/Wallabag/ApiBundle/{Controller,Entity}' diff --git a/src/Wallabag/AnnotationBundle/DependencyInjection/Configuration.php b/src/Wallabag/AnnotationBundle/DependencyInjection/Configuration.php deleted file mode 100644 index bb1e03cf9..000000000 --- a/src/Wallabag/AnnotationBundle/DependencyInjection/Configuration.php +++ /dev/null @@ -1,14 +0,0 @@ -processConfiguration($configuration, $configs); - } -} diff --git a/src/Wallabag/AnnotationBundle/WallabagAnnotationBundle.php b/src/Wallabag/AnnotationBundle/WallabagAnnotationBundle.php deleted file mode 100644 index b64920a33..000000000 --- a/src/Wallabag/AnnotationBundle/WallabagAnnotationBundle.php +++ /dev/null @@ -1,9 +0,0 @@ - Date: Mon, 25 Dec 2023 20:31:23 +0100 Subject: [PATCH 07/38] Rename ManageController to UserController --- .../Controller/{ManageController.php => UserController.php} | 2 +- .../{ManageControllerTest.php => UserControllerTest.php} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/Wallabag/UserBundle/Controller/{ManageController.php => UserController.php} (99%) rename tests/Wallabag/UserBundle/Controller/{ManageControllerTest.php => UserControllerTest.php} (98%) diff --git a/src/Wallabag/UserBundle/Controller/ManageController.php b/src/Wallabag/UserBundle/Controller/UserController.php similarity index 99% rename from src/Wallabag/UserBundle/Controller/ManageController.php rename to src/Wallabag/UserBundle/Controller/UserController.php index 3665d842e..32d4efd7b 100644 --- a/src/Wallabag/UserBundle/Controller/ManageController.php +++ b/src/Wallabag/UserBundle/Controller/UserController.php @@ -27,7 +27,7 @@ use Wallabag\UserBundle\Repository\UserRepository; /** * User controller. */ -class ManageController extends AbstractController +class UserController extends AbstractController { private EntityManagerInterface $entityManager; private TranslatorInterface $translator; diff --git a/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php b/tests/Wallabag/UserBundle/Controller/UserControllerTest.php similarity index 98% rename from tests/Wallabag/UserBundle/Controller/ManageControllerTest.php rename to tests/Wallabag/UserBundle/Controller/UserControllerTest.php index 86b49b698..e746f4277 100644 --- a/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php +++ b/tests/Wallabag/UserBundle/Controller/UserControllerTest.php @@ -4,7 +4,7 @@ namespace Tests\Wallabag\UserBundle\Controller; use Tests\Wallabag\CoreBundle\WallabagCoreTestCase; -class ManageControllerTest extends WallabagCoreTestCase +class UserControllerTest extends WallabagCoreTestCase { public function testLogin() { From fab4ccb01f5beaec4ca3d331c02e70c4ac1d8164 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 25 Dec 2023 20:36:08 +0100 Subject: [PATCH 08/38] Rename Manage template folder to User --- src/Wallabag/UserBundle/Controller/UserController.php | 6 +++--- .../Resources/views/{Manage => User}/edit.html.twig | 0 .../Resources/views/{Manage => User}/index.html.twig | 0 .../Resources/views/{Manage => User}/new.html.twig | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename src/Wallabag/UserBundle/Resources/views/{Manage => User}/edit.html.twig (100%) rename src/Wallabag/UserBundle/Resources/views/{Manage => User}/index.html.twig (100%) rename src/Wallabag/UserBundle/Resources/views/{Manage => User}/new.html.twig (100%) diff --git a/src/Wallabag/UserBundle/Controller/UserController.php b/src/Wallabag/UserBundle/Controller/UserController.php index 32d4efd7b..bfd9900c9 100644 --- a/src/Wallabag/UserBundle/Controller/UserController.php +++ b/src/Wallabag/UserBundle/Controller/UserController.php @@ -68,7 +68,7 @@ class UserController extends AbstractController return $this->redirectToRoute('user_edit', ['id' => $user->getId()]); } - return $this->render('@WallabagUser/Manage/new.html.twig', [ + return $this->render('@WallabagUser/User/new.html.twig', [ 'user' => $user, 'form' => $form->createView(), ]); @@ -109,7 +109,7 @@ class UserController extends AbstractController return $this->redirectToRoute('user_edit', ['id' => $user->getId()]); } - return $this->render('@WallabagUser/Manage/edit.html.twig', [ + return $this->render('@WallabagUser/User/edit.html.twig', [ 'user' => $user, 'edit_form' => $form->createView(), 'delete_form' => $deleteForm->createView(), @@ -174,7 +174,7 @@ class UserController extends AbstractController } } - return $this->render('@WallabagUser/Manage/index.html.twig', [ + return $this->render('@WallabagUser/User/index.html.twig', [ 'searchForm' => $form->createView(), 'users' => $pagerFanta, ]); diff --git a/src/Wallabag/UserBundle/Resources/views/Manage/edit.html.twig b/src/Wallabag/UserBundle/Resources/views/User/edit.html.twig similarity index 100% rename from src/Wallabag/UserBundle/Resources/views/Manage/edit.html.twig rename to src/Wallabag/UserBundle/Resources/views/User/edit.html.twig diff --git a/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig b/src/Wallabag/UserBundle/Resources/views/User/index.html.twig similarity index 100% rename from src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig rename to src/Wallabag/UserBundle/Resources/views/User/index.html.twig diff --git a/src/Wallabag/UserBundle/Resources/views/Manage/new.html.twig b/src/Wallabag/UserBundle/Resources/views/User/new.html.twig similarity index 100% rename from src/Wallabag/UserBundle/Resources/views/Manage/new.html.twig rename to src/Wallabag/UserBundle/Resources/views/User/new.html.twig From a615bcce55829618df3b6546e8cbf38b4b499ba8 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 25 Dec 2023 20:36:42 +0100 Subject: [PATCH 09/38] Remove unused translation file --- .../UserBundle/Resources/translations/wallabag_user.da.yml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/Wallabag/UserBundle/Resources/translations/wallabag_user.da.yml diff --git a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.da.yml b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.da.yml deleted file mode 100644 index 0967ef424..000000000 --- a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.da.yml +++ /dev/null @@ -1 +0,0 @@ -{} From 3d7bb85d7107ca29729382489ea94b6ab22b4951 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sat, 30 Dec 2023 23:23:27 +0100 Subject: [PATCH 10/38] Move User controller to Core --- app/config/routing.yml | 5 ----- app/config/services.yml | 4 ---- .../Controller/UserController.php | 11 +++++------ .../Controller/UserControllerTest.php | 2 +- 4 files changed, 6 insertions(+), 16 deletions(-) rename src/Wallabag/{UserBundle => CoreBundle}/Controller/UserController.php (94%) rename tests/Wallabag/{UserBundle => CoreBundle}/Controller/UserControllerTest.php (98%) diff --git a/app/config/routing.yml b/app/config/routing.yml index 1a781dbce..205fe8230 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -3,11 +3,6 @@ wallabag_import: type: annotation prefix: /import -wallabag_user: - resource: "@WallabagUserBundle/Controller/" - type: annotation - prefix: /users - wallabag_api: resource: "@WallabagApiBundle/Controller/" type: annotation diff --git a/app/config/services.yml b/app/config/services.yml index d65fa1d00..ec204cf26 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -54,10 +54,6 @@ services: resource: '../../src/Wallabag/ImportBundle/Controller/' tags: ['controller.service_arguments'] - Wallabag\UserBundle\Controller\: - resource: '../../src/Wallabag/UserBundle/Controller/' - tags: ['controller.service_arguments'] - # inject alias service into controllers Wallabag\ImportBundle\Controller\ChromeController: arguments: diff --git a/src/Wallabag/UserBundle/Controller/UserController.php b/src/Wallabag/CoreBundle/Controller/UserController.php similarity index 94% rename from src/Wallabag/UserBundle/Controller/UserController.php rename to src/Wallabag/CoreBundle/Controller/UserController.php index bfd9900c9..8462b7f87 100644 --- a/src/Wallabag/UserBundle/Controller/UserController.php +++ b/src/Wallabag/CoreBundle/Controller/UserController.php @@ -1,6 +1,6 @@ Date: Sat, 30 Dec 2023 23:26:05 +0100 Subject: [PATCH 11/38] Move User fixtures to Core --- app/config/services_test.yml | 5 ----- src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php | 1 - src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php | 1 - src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php | 1 - .../CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php | 1 - .../CoreBundle/DataFixtures/SiteCredentialFixtures.php | 1 - .../{UserBundle => CoreBundle}/DataFixtures/UserFixtures.php | 2 +- 7 files changed, 1 insertion(+), 11 deletions(-) rename src/Wallabag/{UserBundle => CoreBundle}/DataFixtures/UserFixtures.php (96%) diff --git a/app/config/services_test.yml b/app/config/services_test.yml index 781d5c770..02aae0b76 100644 --- a/app/config/services_test.yml +++ b/app/config/services_test.yml @@ -22,11 +22,6 @@ services: - "%kernel.cache_dir%/doctrine/metadata" # fixtures - Wallabag\UserBundle\DataFixtures\: - resource: '../../src/Wallabag/UserBundle/DataFixtures/*' - tags: ['doctrine.fixture.orm'] - autowire: true - Wallabag\CoreBundle\DataFixtures\: resource: '../../src/Wallabag/CoreBundle/DataFixtures/*' tags: ['doctrine.fixture.orm'] diff --git a/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php index 2f4db5adc..5c49ceed0 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php @@ -7,7 +7,6 @@ use Doctrine\Common\DataFixtures\DependentFixtureInterface; use Doctrine\Persistence\ObjectManager; use Wallabag\CoreBundle\Entity\Annotation; use Wallabag\CoreBundle\Entity\Entry; -use Wallabag\UserBundle\DataFixtures\UserFixtures; use Wallabag\UserBundle\Entity\User; class AnnotationFixtures extends Fixture implements DependentFixtureInterface diff --git a/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php index 1992fb905..45e7b6f20 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php @@ -6,7 +6,6 @@ use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Common\DataFixtures\DependentFixtureInterface; use Doctrine\Persistence\ObjectManager; use Wallabag\CoreBundle\Entity\Config; -use Wallabag\UserBundle\DataFixtures\UserFixtures; use Wallabag\UserBundle\Entity\User; class ConfigFixtures extends Fixture implements DependentFixtureInterface diff --git a/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php index 571c8e8b2..acb32695b 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php @@ -7,7 +7,6 @@ use Doctrine\Common\DataFixtures\DependentFixtureInterface; use Doctrine\Persistence\ObjectManager; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Tag; -use Wallabag\UserBundle\DataFixtures\UserFixtures; use Wallabag\UserBundle\Entity\User; class EntryFixtures extends Fixture implements DependentFixtureInterface diff --git a/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php index 22b7efae6..a17685619 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php @@ -6,7 +6,6 @@ use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Common\DataFixtures\DependentFixtureInterface; use Doctrine\Persistence\ObjectManager; use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule; -use Wallabag\UserBundle\DataFixtures\UserFixtures; use Wallabag\UserBundle\Entity\User; class IgnoreOriginUserRuleFixtures extends Fixture implements DependentFixtureInterface diff --git a/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php index 92c226e10..8bb952cad 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php @@ -9,7 +9,6 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Wallabag\CoreBundle\Entity\SiteCredential; use Wallabag\CoreBundle\Helper\CryptoProxy; -use Wallabag\UserBundle\DataFixtures\UserFixtures; use Wallabag\UserBundle\Entity\User; class SiteCredentialFixtures extends Fixture implements DependentFixtureInterface, ContainerAwareInterface diff --git a/src/Wallabag/UserBundle/DataFixtures/UserFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/UserFixtures.php similarity index 96% rename from src/Wallabag/UserBundle/DataFixtures/UserFixtures.php rename to src/Wallabag/CoreBundle/DataFixtures/UserFixtures.php index b5ab28fa5..a0951fe1c 100644 --- a/src/Wallabag/UserBundle/DataFixtures/UserFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/UserFixtures.php @@ -1,6 +1,6 @@ Date: Sat, 30 Dec 2023 23:32:36 +0100 Subject: [PATCH 12/38] Move User entity to Core --- app/config/config.yml | 2 +- app/config/security.yml | 2 +- .../ApiBundle/Controller/UserRestController.php | 2 +- .../ApiBundle/Controller/WallabagRestController.php | 2 +- src/Wallabag/ApiBundle/Entity/AccessToken.php | 2 +- src/Wallabag/ApiBundle/Entity/AuthCode.php | 2 +- src/Wallabag/ApiBundle/Entity/Client.php | 4 ++-- src/Wallabag/ApiBundle/Entity/RefreshToken.php | 2 +- .../CoreBundle/Command/CleanDuplicatesCommand.php | 2 +- .../CoreBundle/Command/GenerateUrlHashesCommand.php | 2 +- src/Wallabag/CoreBundle/Command/InstallCommand.php | 2 +- src/Wallabag/CoreBundle/Command/ShowUserCommand.php | 2 +- src/Wallabag/CoreBundle/Command/TagAllCommand.php | 2 +- .../CoreBundle/Controller/AbstractController.php | 2 +- .../CoreBundle/Controller/AnnotationController.php | 2 +- .../CoreBundle/Controller/FeedController.php | 12 ++++++------ .../Controller/SiteCredentialController.php | 2 +- .../CoreBundle/Controller/UserController.php | 2 +- .../CoreBundle/DataFixtures/AnnotationFixtures.php | 2 +- .../CoreBundle/DataFixtures/ConfigFixtures.php | 2 +- .../CoreBundle/DataFixtures/EntryFixtures.php | 2 +- .../DataFixtures/IgnoreOriginUserRuleFixtures.php | 2 +- .../DataFixtures/SiteCredentialFixtures.php | 2 +- .../CoreBundle/DataFixtures/UserFixtures.php | 2 +- src/Wallabag/CoreBundle/Entity/Annotation.php | 3 +-- src/Wallabag/CoreBundle/Entity/Config.php | 3 +-- src/Wallabag/CoreBundle/Entity/Entry.php | 3 +-- src/Wallabag/CoreBundle/Entity/SiteCredential.php | 3 +-- .../{UserBundle => CoreBundle}/Entity/User.php | 4 +--- .../CoreBundle/Event/Listener/UserLocaleListener.php | 2 +- .../CoreBundle/Form/Type/EntryFilterType.php | 2 +- .../CoreBundle/Form/Type/UserInformationType.php | 2 +- src/Wallabag/CoreBundle/Helper/EntriesExport.php | 2 +- .../CoreBundle/Helper/PreparePagerForEntries.php | 2 +- src/Wallabag/CoreBundle/Helper/Redirect.php | 2 +- src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php | 2 +- .../ParamConverter/UsernameFeedTokenConverter.php | 4 ++-- src/Wallabag/CoreBundle/Twig/WallabagExtension.php | 2 +- src/Wallabag/ImportBundle/Command/ImportCommand.php | 2 +- src/Wallabag/ImportBundle/Import/AbstractImport.php | 2 +- src/Wallabag/UserBundle/Form/NewUserType.php | 2 +- src/Wallabag/UserBundle/Form/UserType.php | 2 +- .../UserBundle/Repository/UserRepository.php | 2 +- .../ApiBundle/Controller/EntryRestControllerTest.php | 2 +- tests/Wallabag/ApiBundle/WallabagApiTestCase.php | 2 +- .../Command/CleanDuplicatesCommandTest.php | 2 +- .../Command/GenerateUrlHashesCommandTest.php | 2 +- .../CoreBundle/Command/ShowUserCommandTest.php | 2 +- .../Controller/AnnotationControllerTest.php | 2 +- .../CoreBundle/Controller/ConfigControllerTest.php | 2 +- .../CoreBundle/Controller/EntryControllerTest.php | 2 +- .../CoreBundle/Controller/FeedControllerTest.php | 2 +- .../CoreBundle/Controller/SecurityControllerTest.php | 2 +- .../CoreBundle/Controller/TagControllerTest.php | 2 +- .../Event/Listener/UserLocaleListenerTest.php | 2 +- .../Event/Subscriber/TablePrefixSubscriberTest.php | 4 ++-- .../GrabySiteConfigBuilderTest.php | 2 +- .../Wallabag/CoreBundle/Helper/ContentProxyTest.php | 2 +- tests/Wallabag/CoreBundle/Helper/RedirectTest.php | 2 +- .../Helper/RuleBasedIgnoreOriginProcessorTest.php | 2 +- .../CoreBundle/Helper/RuleBasedTaggerTest.php | 2 +- .../Wallabag/CoreBundle/Helper/TagsAssignerTest.php | 2 +- .../UsernameFeedTokenConverterTest.php | 2 +- tests/Wallabag/CoreBundle/WallabagCoreTestCase.php | 2 +- .../ImportBundle/Consumer/AMQPEntryConsumerTest.php | 2 +- .../ImportBundle/Consumer/RedisEntryConsumerTest.php | 2 +- .../ImportBundle/Import/ChromeImportTest.php | 2 +- .../ImportBundle/Import/FirefoxImportTest.php | 2 +- .../ImportBundle/Import/InstapaperImportTest.php | 2 +- .../ImportBundle/Import/PocketHtmlImportTest.php | 2 +- .../ImportBundle/Import/PocketImportTest.php | 2 +- .../ImportBundle/Import/ReadabilityImportTest.php | 2 +- .../ImportBundle/Import/ShaarliImportTest.php | 2 +- .../ImportBundle/Import/WallabagV1ImportTest.php | 2 +- .../ImportBundle/Import/WallabagV2ImportTest.php | 2 +- .../EventListener/CreateConfigListenerTest.php | 2 +- .../UserBundle/Mailer/AuthCodeMailerTest.php | 2 +- 77 files changed, 85 insertions(+), 91 deletions(-) rename src/Wallabag/{UserBundle => CoreBundle}/Entity/User.php (98%) diff --git a/app/config/config.yml b/app/config/config.yml index e62a00990..e9129223c 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -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%" diff --git a/app/config/security.yml b/app/config/security.yml index 9ab516215..2c7bf8677 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -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 diff --git a/src/Wallabag/ApiBundle/Controller/UserRestController.php b/src/Wallabag/ApiBundle/Controller/UserRestController.php index a859e3597..fa156368a 100644 --- a/src/Wallabag/ApiBundle/Controller/UserRestController.php +++ b/src/Wallabag/ApiBundle/Controller/UserRestController.php @@ -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 diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index c0ff32bdf..9600607f5 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php @@ -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 { diff --git a/src/Wallabag/ApiBundle/Entity/AccessToken.php b/src/Wallabag/ApiBundle/Entity/AccessToken.php index 98e0af3e1..29f81ccaf 100644 --- a/src/Wallabag/ApiBundle/Entity/AccessToken.php +++ b/src/Wallabag/ApiBundle/Entity/AccessToken.php @@ -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; diff --git a/src/Wallabag/ApiBundle/Entity/AuthCode.php b/src/Wallabag/ApiBundle/Entity/AuthCode.php index 7c9c85396..674016ad3 100644 --- a/src/Wallabag/ApiBundle/Entity/AuthCode.php +++ b/src/Wallabag/ApiBundle/Entity/AuthCode.php @@ -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; diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php index 6760864e8..4eff6a588 100644 --- a/src/Wallabag/ApiBundle/Entity/Client.php +++ b/src/Wallabag/ApiBundle/Entity/Client.php @@ -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; diff --git a/src/Wallabag/ApiBundle/Entity/RefreshToken.php b/src/Wallabag/ApiBundle/Entity/RefreshToken.php index 55a507e13..8c61cac38 100644 --- a/src/Wallabag/ApiBundle/Entity/RefreshToken.php +++ b/src/Wallabag/ApiBundle/Entity/RefreshToken.php @@ -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; diff --git a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php index 045828235..cd3da8b72 100644 --- a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php +++ b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php @@ -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 diff --git a/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php b/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php index c5980d3fd..7d003b4f7 100644 --- a/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php +++ b/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php @@ -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 diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index a35cc08cd..877eedec3 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -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 { diff --git a/src/Wallabag/CoreBundle/Command/ShowUserCommand.php b/src/Wallabag/CoreBundle/Command/ShowUserCommand.php index 61a882634..3e7b25afd 100644 --- a/src/Wallabag/CoreBundle/Command/ShowUserCommand.php +++ b/src/Wallabag/CoreBundle/Command/ShowUserCommand.php @@ -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 diff --git a/src/Wallabag/CoreBundle/Command/TagAllCommand.php b/src/Wallabag/CoreBundle/Command/TagAllCommand.php index 37f84fef9..e374ddcdb 100644 --- a/src/Wallabag/CoreBundle/Command/TagAllCommand.php +++ b/src/Wallabag/CoreBundle/Command/TagAllCommand.php @@ -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 diff --git a/src/Wallabag/CoreBundle/Controller/AbstractController.php b/src/Wallabag/CoreBundle/Controller/AbstractController.php index fc12a93b3..1d9b6d7fa 100644 --- a/src/Wallabag/CoreBundle/Controller/AbstractController.php +++ b/src/Wallabag/CoreBundle/Controller/AbstractController.php @@ -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 { diff --git a/src/Wallabag/CoreBundle/Controller/AnnotationController.php b/src/Wallabag/CoreBundle/Controller/AnnotationController.php index c73ce26db..fa7cc218a 100644 --- a/src/Wallabag/CoreBundle/Controller/AnnotationController.php +++ b/src/Wallabag/CoreBundle/Controller/AnnotationController.php @@ -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 { diff --git a/src/Wallabag/CoreBundle/Controller/FeedController.php b/src/Wallabag/CoreBundle/Controller/FeedController.php index c95d832b7..3484af4c9 100644 --- a/src/Wallabag/CoreBundle/Controller/FeedController.php +++ b/src/Wallabag/CoreBundle/Controller/FeedController.php @@ -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 diff --git a/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php b/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php index b24303495..864c6aaa4 100644 --- a/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php +++ b/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php @@ -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. diff --git a/src/Wallabag/CoreBundle/Controller/UserController.php b/src/Wallabag/CoreBundle/Controller/UserController.php index 8462b7f87..41b75d559 100644 --- a/src/Wallabag/CoreBundle/Controller/UserController.php +++ b/src/Wallabag/CoreBundle/Controller/UserController.php @@ -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; diff --git a/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php index 5c49ceed0..aba2c1d5a 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/AnnotationFixtures.php @@ -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 { diff --git a/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php index 45e7b6f20..930c6497a 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php @@ -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 { diff --git a/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php index acb32695b..284fb19de 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/EntryFixtures.php @@ -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 { diff --git a/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php index a17685619..8093e9138 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/IgnoreOriginUserRuleFixtures.php @@ -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 { diff --git a/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php index 8bb952cad..07bfb59aa 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/SiteCredentialFixtures.php @@ -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 { diff --git a/src/Wallabag/CoreBundle/DataFixtures/UserFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/UserFixtures.php index a0951fe1c..407dff4a4 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/UserFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/UserFixtures.php @@ -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 { diff --git a/src/Wallabag/CoreBundle/Entity/Annotation.php b/src/Wallabag/CoreBundle/Entity/Annotation.php index a83a659ee..bda05642b 100644 --- a/src/Wallabag/CoreBundle/Entity/Annotation.php +++ b/src/Wallabag/CoreBundle/Entity/Annotation.php @@ -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; diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php index 3c426ca20..4db390166 100644 --- a/src/Wallabag/CoreBundle/Entity/Config.php +++ b/src/Wallabag/CoreBundle/Entity/Config.php @@ -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; diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index dd34e5884..76199a95e 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -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"}) */ diff --git a/src/Wallabag/CoreBundle/Entity/SiteCredential.php b/src/Wallabag/CoreBundle/Entity/SiteCredential.php index dee48fd52..912fef6b1 100644 --- a/src/Wallabag/CoreBundle/Entity/SiteCredential.php +++ b/src/Wallabag/CoreBundle/Entity/SiteCredential.php @@ -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; diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/CoreBundle/Entity/User.php similarity index 98% rename from src/Wallabag/UserBundle/Entity/User.php rename to src/Wallabag/CoreBundle/Entity/User.php index 611a031e8..fe992caf8 100644 --- a/src/Wallabag/UserBundle/Entity/User.php +++ b/src/Wallabag/CoreBundle/Entity/User.php @@ -1,6 +1,6 @@ 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; } diff --git a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php index e7a52680c..87135f5c6 100644 --- a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php +++ b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php @@ -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 { diff --git a/src/Wallabag/ImportBundle/Command/ImportCommand.php b/src/Wallabag/ImportBundle/Command/ImportCommand.php index 9e4e11c1f..8aacd04a2 100644 --- a/src/Wallabag/ImportBundle/Command/ImportCommand.php +++ b/src/Wallabag/ImportBundle/Command/ImportCommand.php @@ -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 diff --git a/src/Wallabag/ImportBundle/Import/AbstractImport.php b/src/Wallabag/ImportBundle/Import/AbstractImport.php index 7ede63f6a..c9a47562c 100644 --- a/src/Wallabag/ImportBundle/Import/AbstractImport.php +++ b/src/Wallabag/ImportBundle/Import/AbstractImport.php @@ -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 { diff --git a/src/Wallabag/UserBundle/Form/NewUserType.php b/src/Wallabag/UserBundle/Form/NewUserType.php index ff63e2906..66d718c0f 100644 --- a/src/Wallabag/UserBundle/Form/NewUserType.php +++ b/src/Wallabag/UserBundle/Form/NewUserType.php @@ -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 { diff --git a/src/Wallabag/UserBundle/Form/UserType.php b/src/Wallabag/UserBundle/Form/UserType.php index ab0db2033..62f2a6363 100644 --- a/src/Wallabag/UserBundle/Form/UserType.php +++ b/src/Wallabag/UserBundle/Form/UserType.php @@ -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 { diff --git a/src/Wallabag/UserBundle/Repository/UserRepository.php b/src/Wallabag/UserBundle/Repository/UserRepository.php index 9cafe5c55..8369a6c7b 100644 --- a/src/Wallabag/UserBundle/Repository/UserRepository.php +++ b/src/Wallabag/UserBundle/Repository/UserRepository.php @@ -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) diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index 938811617..9e683305a 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php @@ -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 { diff --git a/tests/Wallabag/ApiBundle/WallabagApiTestCase.php b/tests/Wallabag/ApiBundle/WallabagApiTestCase.php index 53047001b..6543c35a3 100644 --- a/tests/Wallabag/ApiBundle/WallabagApiTestCase.php +++ b/tests/Wallabag/ApiBundle/WallabagApiTestCase.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Command/CleanDuplicatesCommandTest.php b/tests/Wallabag/CoreBundle/Command/CleanDuplicatesCommandTest.php index d70466818..6bb731e3a 100644 --- a/tests/Wallabag/CoreBundle/Command/CleanDuplicatesCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/CleanDuplicatesCommandTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php b/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php index d90c87f77..e20e02333 100644 --- a/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Command/ShowUserCommandTest.php b/tests/Wallabag/CoreBundle/Command/ShowUserCommandTest.php index 712a3f47a..1d5a35fa0 100644 --- a/tests/Wallabag/CoreBundle/Command/ShowUserCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/ShowUserCommandTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Controller/AnnotationControllerTest.php b/tests/Wallabag/CoreBundle/Controller/AnnotationControllerTest.php index a6b7d8177..4f6c0b022 100644 --- a/tests/Wallabag/CoreBundle/Controller/AnnotationControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/AnnotationControllerTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php index 7a0640103..c6e4296d3 100644 --- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index 70d106384..051af7974 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php b/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php index 6e4f3e437..5241d9f8f 100644 --- a/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php b/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php index cb33df278..636214288 100644 --- a/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php index 9c5f61fd0..e994b8f13 100644 --- a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php @@ -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 diff --git a/tests/Wallabag/CoreBundle/Event/Listener/UserLocaleListenerTest.php b/tests/Wallabag/CoreBundle/Event/Listener/UserLocaleListenerTest.php index ff0a9602b..80637b3c4 100644 --- a/tests/Wallabag/CoreBundle/Event/Listener/UserLocaleListenerTest.php +++ b/tests/Wallabag/CoreBundle/Event/Listener/UserLocaleListenerTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriberTest.php b/tests/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriberTest.php index 0fc81f462..e388258b6 100644 --- a/tests/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriberTest.php +++ b/tests/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriberTest.php @@ -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', diff --git a/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php b/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php index f074bfd22..7a3a1c0cf 100644 --- a/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php +++ b/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php index 430ff6d10..2fed3e498 100644 --- a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php +++ b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Helper/RedirectTest.php b/tests/Wallabag/CoreBundle/Helper/RedirectTest.php index 9c0322d3f..fece6156e 100644 --- a/tests/Wallabag/CoreBundle/Helper/RedirectTest.php +++ b/tests/Wallabag/CoreBundle/Helper/RedirectTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Helper/RuleBasedIgnoreOriginProcessorTest.php b/tests/Wallabag/CoreBundle/Helper/RuleBasedIgnoreOriginProcessorTest.php index 4bd62ba4e..da550efd4 100644 --- a/tests/Wallabag/CoreBundle/Helper/RuleBasedIgnoreOriginProcessorTest.php +++ b/tests/Wallabag/CoreBundle/Helper/RuleBasedIgnoreOriginProcessorTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Helper/RuleBasedTaggerTest.php b/tests/Wallabag/CoreBundle/Helper/RuleBasedTaggerTest.php index da11737ca..6bd837057 100644 --- a/tests/Wallabag/CoreBundle/Helper/RuleBasedTaggerTest.php +++ b/tests/Wallabag/CoreBundle/Helper/RuleBasedTaggerTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/Helper/TagsAssignerTest.php b/tests/Wallabag/CoreBundle/Helper/TagsAssignerTest.php index 1285c99c6..7fa507659 100644 --- a/tests/Wallabag/CoreBundle/Helper/TagsAssignerTest.php +++ b/tests/Wallabag/CoreBundle/Helper/TagsAssignerTest.php @@ -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 { diff --git a/tests/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverterTest.php b/tests/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverterTest.php index 9c7a41731..7731ab260 100644 --- a/tests/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverterTest.php +++ b/tests/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverterTest.php @@ -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 diff --git a/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php b/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php index a5654a83f..20673c0e1 100644 --- a/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php +++ b/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php @@ -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 { diff --git a/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php b/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php index c02bb366f..d2a577d90 100644 --- a/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php +++ b/tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php @@ -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 diff --git a/tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php b/tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php index 7213c27cc..6fa194863 100644 --- a/tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php +++ b/tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php @@ -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 diff --git a/tests/Wallabag/ImportBundle/Import/ChromeImportTest.php b/tests/Wallabag/ImportBundle/Import/ChromeImportTest.php index 2829466c0..2585e10a3 100644 --- a/tests/Wallabag/ImportBundle/Import/ChromeImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/ChromeImportTest.php @@ -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 { diff --git a/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php b/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php index 362c2ee05..0fbe537ae 100644 --- a/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php @@ -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 { diff --git a/tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php b/tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php index 84900d3fb..ec67344a1 100644 --- a/tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php @@ -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 { diff --git a/tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php index 6ff5e13a0..003a1961c 100644 --- a/tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php @@ -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 { diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php index f6a09f18c..04858f476 100644 --- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php @@ -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 { diff --git a/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php b/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php index 6b2622ccb..a7f043291 100644 --- a/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php @@ -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 { diff --git a/tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php b/tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php index 04f8223dd..478916716 100644 --- a/tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php @@ -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 { diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php b/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php index 5da4aa658..d248974e1 100644 --- a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php @@ -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 { diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php b/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php index 59173f58a..03cefa4d6 100644 --- a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php @@ -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 { diff --git a/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php b/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php index c4077016d..d3b05eeac 100644 --- a/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php +++ b/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php @@ -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 diff --git a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php index 983d39a34..400bf8f32 100644 --- a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php +++ b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php @@ -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 From bdeaa93dd85881e1a2df1dc6852373e99dbc0670 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sat, 30 Dec 2023 23:38:22 +0100 Subject: [PATCH 13/38] Move User repository to Core --- app/config/services_test.yml | 2 +- src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php | 2 +- src/Wallabag/CoreBundle/Command/ExportCommand.php | 2 +- src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php | 2 +- src/Wallabag/CoreBundle/Command/ListUserCommand.php | 2 +- src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php | 2 +- src/Wallabag/CoreBundle/Command/ShowUserCommand.php | 2 +- src/Wallabag/CoreBundle/Command/TagAllCommand.php | 2 +- src/Wallabag/CoreBundle/Controller/ConfigController.php | 2 +- src/Wallabag/CoreBundle/Controller/UserController.php | 2 +- src/Wallabag/CoreBundle/Entity/User.php | 2 +- .../CoreBundle/ParamConverter/UsernameFeedTokenConverter.php | 2 +- .../{UserBundle => CoreBundle}/Repository/UserRepository.php | 2 +- src/Wallabag/ImportBundle/Command/ImportCommand.php | 2 +- src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php | 2 +- .../ParamConverter/UsernameFeedTokenConverterTest.php | 2 +- tests/Wallabag/ImportBundle/Consumer/AMQPEntryConsumerTest.php | 2 +- tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) rename src/Wallabag/{UserBundle => CoreBundle}/Repository/UserRepository.php (98%) diff --git a/app/config/services_test.yml b/app/config/services_test.yml index 02aae0b76..749207ce8 100644 --- a/app/config/services_test.yml +++ b/app/config/services_test.yml @@ -13,7 +13,7 @@ services: public: true wallabag_user.user_repository.test: - alias: Wallabag\UserBundle\Repository\UserRepository + alias: Wallabag\CoreBundle\Repository\UserRepository public: true filesystem_cache: diff --git a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php index cd3da8b72..865ec71ff 100644 --- a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php +++ b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php @@ -12,7 +12,7 @@ use Symfony\Component\Console\Style\SymfonyStyle; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\User; use Wallabag\CoreBundle\Repository\EntryRepository; -use Wallabag\UserBundle\Repository\UserRepository; +use Wallabag\CoreBundle\Repository\UserRepository; class CleanDuplicatesCommand extends Command { diff --git a/src/Wallabag/CoreBundle/Command/ExportCommand.php b/src/Wallabag/CoreBundle/Command/ExportCommand.php index a11892ecd..6a6e5c6a4 100644 --- a/src/Wallabag/CoreBundle/Command/ExportCommand.php +++ b/src/Wallabag/CoreBundle/Command/ExportCommand.php @@ -10,7 +10,7 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; use Wallabag\CoreBundle\Helper\EntriesExport; use Wallabag\CoreBundle\Repository\EntryRepository; -use Wallabag\UserBundle\Repository\UserRepository; +use Wallabag\CoreBundle\Repository\UserRepository; class ExportCommand extends Command { diff --git a/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php b/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php index 7d003b4f7..b1f1b7c99 100644 --- a/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php +++ b/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php @@ -11,7 +11,7 @@ use Symfony\Component\Console\Output\OutputInterface; use Wallabag\CoreBundle\Entity\User; use Wallabag\CoreBundle\Helper\UrlHasher; use Wallabag\CoreBundle\Repository\EntryRepository; -use Wallabag\UserBundle\Repository\UserRepository; +use Wallabag\CoreBundle\Repository\UserRepository; class GenerateUrlHashesCommand extends Command { diff --git a/src/Wallabag/CoreBundle/Command/ListUserCommand.php b/src/Wallabag/CoreBundle/Command/ListUserCommand.php index f4898c48c..3d1a23615 100644 --- a/src/Wallabag/CoreBundle/Command/ListUserCommand.php +++ b/src/Wallabag/CoreBundle/Command/ListUserCommand.php @@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; -use Wallabag\UserBundle\Repository\UserRepository; +use Wallabag\CoreBundle\Repository\UserRepository; class ListUserCommand extends Command { diff --git a/src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php b/src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php index b8357bbf2..96785940a 100644 --- a/src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php +++ b/src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php @@ -14,7 +14,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Wallabag\CoreBundle\Event\EntrySavedEvent; use Wallabag\CoreBundle\Helper\ContentProxy; use Wallabag\CoreBundle\Repository\EntryRepository; -use Wallabag\UserBundle\Repository\UserRepository; +use Wallabag\CoreBundle\Repository\UserRepository; class ReloadEntryCommand extends Command { diff --git a/src/Wallabag/CoreBundle/Command/ShowUserCommand.php b/src/Wallabag/CoreBundle/Command/ShowUserCommand.php index 3e7b25afd..f01685e8b 100644 --- a/src/Wallabag/CoreBundle/Command/ShowUserCommand.php +++ b/src/Wallabag/CoreBundle/Command/ShowUserCommand.php @@ -9,7 +9,7 @@ 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\UserBundle\Repository\UserRepository; +use Wallabag\CoreBundle\Repository\UserRepository; class ShowUserCommand extends Command { diff --git a/src/Wallabag/CoreBundle/Command/TagAllCommand.php b/src/Wallabag/CoreBundle/Command/TagAllCommand.php index e374ddcdb..05a2e56ae 100644 --- a/src/Wallabag/CoreBundle/Command/TagAllCommand.php +++ b/src/Wallabag/CoreBundle/Command/TagAllCommand.php @@ -11,7 +11,7 @@ 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\Repository\UserRepository; +use Wallabag\CoreBundle\Repository\UserRepository; class TagAllCommand extends Command { diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index bfd3ffdc1..3fc6b0d34 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -39,8 +39,8 @@ use Wallabag\CoreBundle\Repository\EntryRepository; use Wallabag\CoreBundle\Repository\IgnoreOriginUserRuleRepository; use Wallabag\CoreBundle\Repository\TaggingRuleRepository; use Wallabag\CoreBundle\Repository\TagRepository; +use Wallabag\CoreBundle\Repository\UserRepository; use Wallabag\CoreBundle\Tools\Utils; -use Wallabag\UserBundle\Repository\UserRepository; class ConfigController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/UserController.php b/src/Wallabag/CoreBundle/Controller/UserController.php index 41b75d559..c31dbc9a4 100644 --- a/src/Wallabag/CoreBundle/Controller/UserController.php +++ b/src/Wallabag/CoreBundle/Controller/UserController.php @@ -18,10 +18,10 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Entity\User; +use Wallabag\CoreBundle\Repository\UserRepository; use Wallabag\UserBundle\Form\NewUserType; use Wallabag\UserBundle\Form\SearchUserType; use Wallabag\UserBundle\Form\UserType; -use Wallabag\UserBundle\Repository\UserRepository; /** * User controller. diff --git a/src/Wallabag/CoreBundle/Entity/User.php b/src/Wallabag/CoreBundle/Entity/User.php index fe992caf8..0a1586f4b 100644 --- a/src/Wallabag/CoreBundle/Entity/User.php +++ b/src/Wallabag/CoreBundle/Entity/User.php @@ -21,7 +21,7 @@ use Wallabag\CoreBundle\Helper\EntityTimestampsTrait; * User. * * @XmlRoot("user") - * @ORM\Entity(repositoryClass="Wallabag\UserBundle\Repository\UserRepository") + * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\UserRepository") * @ORM\Table(name="`user`") * @ORM\HasLifecycleCallbacks() * diff --git a/src/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverter.php b/src/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverter.php index 02026a60a..6722396fd 100644 --- a/src/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverter.php +++ b/src/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverter.php @@ -8,7 +8,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInte use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Wallabag\CoreBundle\Entity\User; -use Wallabag\UserBundle\Repository\UserRepository; +use Wallabag\CoreBundle\Repository\UserRepository; /** * ParamConverter used in the Feed controller to retrieve the right user according to diff --git a/src/Wallabag/UserBundle/Repository/UserRepository.php b/src/Wallabag/CoreBundle/Repository/UserRepository.php similarity index 98% rename from src/Wallabag/UserBundle/Repository/UserRepository.php rename to src/Wallabag/CoreBundle/Repository/UserRepository.php index 8369a6c7b..c1350e8a0 100644 --- a/src/Wallabag/UserBundle/Repository/UserRepository.php +++ b/src/Wallabag/CoreBundle/Repository/UserRepository.php @@ -1,6 +1,6 @@ Date: Sat, 30 Dec 2023 23:41:01 +0100 Subject: [PATCH 14/38] Move User form types to Core --- src/Wallabag/ApiBundle/Controller/UserRestController.php | 2 +- src/Wallabag/CoreBundle/Controller/UserController.php | 6 +++--- .../Form => CoreBundle/Form/Type}/NewUserType.php | 2 +- .../Form => CoreBundle/Form/Type}/SearchUserType.php | 2 +- .../{UserBundle/Form => CoreBundle/Form/Type}/UserType.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename src/Wallabag/{UserBundle/Form => CoreBundle/Form/Type}/NewUserType.php (98%) rename src/Wallabag/{UserBundle/Form => CoreBundle/Form/Type}/SearchUserType.php (94%) rename src/Wallabag/{UserBundle/Form => CoreBundle/Form/Type}/UserType.php (97%) diff --git a/src/Wallabag/ApiBundle/Controller/UserRestController.php b/src/Wallabag/ApiBundle/Controller/UserRestController.php index fa156368a..a1c3e29d1 100644 --- a/src/Wallabag/ApiBundle/Controller/UserRestController.php +++ b/src/Wallabag/ApiBundle/Controller/UserRestController.php @@ -17,7 +17,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Wallabag\ApiBundle\Entity\Client; use Wallabag\CoreBundle\Entity\User; -use Wallabag\UserBundle\Form\NewUserType; +use Wallabag\CoreBundle\Form\Type\NewUserType; class UserRestController extends WallabagRestController { diff --git a/src/Wallabag/CoreBundle/Controller/UserController.php b/src/Wallabag/CoreBundle/Controller/UserController.php index c31dbc9a4..525a6431c 100644 --- a/src/Wallabag/CoreBundle/Controller/UserController.php +++ b/src/Wallabag/CoreBundle/Controller/UserController.php @@ -18,10 +18,10 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Entity\User; +use Wallabag\CoreBundle\Form\Type\NewUserType; +use Wallabag\CoreBundle\Form\Type\SearchUserType; +use Wallabag\CoreBundle\Form\Type\UserType; use Wallabag\CoreBundle\Repository\UserRepository; -use Wallabag\UserBundle\Form\NewUserType; -use Wallabag\UserBundle\Form\SearchUserType; -use Wallabag\UserBundle\Form\UserType; /** * User controller. diff --git a/src/Wallabag/UserBundle/Form/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php similarity index 98% rename from src/Wallabag/UserBundle/Form/NewUserType.php rename to src/Wallabag/CoreBundle/Form/Type/NewUserType.php index 66d718c0f..acdb60cc2 100644 --- a/src/Wallabag/UserBundle/Form/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php @@ -1,6 +1,6 @@ Date: Sat, 30 Dec 2023 23:44:10 +0100 Subject: [PATCH 15/38] Move User mailer to Core --- app/config/config.yml | 4 +- app/config/services.yml | 2 +- phpstan-baseline.neon | 66 +++++++++---------- .../Mailer/AuthCodeMailer.php | 2 +- .../Mailer/UserMailer.php | 2 +- .../Mailer/AuthCodeMailerTest.php | 4 +- 6 files changed, 40 insertions(+), 40 deletions(-) rename src/Wallabag/{UserBundle => CoreBundle}/Mailer/AuthCodeMailer.php (98%) rename src/Wallabag/{UserBundle => CoreBundle}/Mailer/UserMailer.php (98%) rename tests/Wallabag/{UserBundle => CoreBundle}/Mailer/AuthCodeMailerTest.php (96%) diff --git a/app/config/config.yml b/app/config/config.yml index e9129223c..386aefb99 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -168,7 +168,7 @@ fos_user: address: "%from_email%" sender_name: wallabag service: - mailer: Wallabag\UserBundle\Mailer\UserMailer + mailer: Wallabag\CoreBundle\Mailer\UserMailer fos_oauth_server: db_driver: orm @@ -201,7 +201,7 @@ scheb_two_factor: sender_email: "%twofactor_sender%" digits: 6 template: "@WallabagUser/Authentication/form.html.twig" - mailer: Wallabag\UserBundle\Mailer\AuthCodeMailer + mailer: Wallabag\CoreBundle\Mailer\AuthCodeMailer rulerz: targets: diff --git a/app/config/services.yml b/app/config/services.yml index ec204cf26..0b14770db 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -318,7 +318,7 @@ services: wallabag_core.entry.download_images.client: alias: 'httplug.client.wallabag_core.entry.download_images' - Wallabag\UserBundle\Mailer\UserMailer: + Wallabag\CoreBundle\Mailer\UserMailer: arguments: $parameters: template: diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index d3a0c1aec..97a244c70 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -30,45 +30,45 @@ parameters: count: 10 path: src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php - - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Controller/BrowserController.php - - - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Controller/BrowserController.php - - - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Controller/HtmlController.php - - - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Controller/HtmlController.php - - - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Controller/WallabagController.php - - - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Controller/WallabagController.php - - message: "#^Call to an undefined method Scheb\\\\TwoFactorBundle\\\\Model\\\\Email\\\\TwoFactorInterface\\:\\:getName\\(\\)\\.$#" count: 2 - path: src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php + path: src/Wallabag/CoreBundle/Mailer/AuthCodeMailer.php - - message: "#^PHPDoc type Symfony\\\\Component\\\\Mailer\\\\MailerInterface of property Wallabag\\\\UserBundle\\\\Mailer\\\\UserMailer\\:\\:\\$mailer is not covariant with PHPDoc type Swift_Mailer of overridden property FOS\\\\UserBundle\\\\Mailer\\\\TwigSwiftMailer\\:\\:\\$mailer\\.$#" + message: "#^PHPDoc type Symfony\\\\Component\\\\Mailer\\\\MailerInterface of property Wallabag\\\\CoreBundle\\\\Mailer\\\\UserMailer\\:\\:\\$mailer is not covariant with PHPDoc type Swift_Mailer of overridden property FOS\\\\UserBundle\\\\Mailer\\\\TwigSwiftMailer\\:\\:\\$mailer\\.$#" count: 1 - path: src/Wallabag/UserBundle/Mailer/UserMailer.php + path: src/Wallabag/CoreBundle/Mailer/UserMailer.php + + - + message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" + count: 1 + path: src/Wallabag/ImportBundle/Controller/BrowserController.php + + - + message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" + count: 1 + path: src/Wallabag/ImportBundle/Controller/BrowserController.php + + - + message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" + count: 1 + path: src/Wallabag/ImportBundle/Controller/HtmlController.php + + - + message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" + count: 1 + path: src/Wallabag/ImportBundle/Controller/HtmlController.php + + - + message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" + count: 1 + path: src/Wallabag/ImportBundle/Controller/WallabagController.php + + - + message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" + count: 1 + path: src/Wallabag/ImportBundle/Controller/WallabagController.php - message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#" diff --git a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/CoreBundle/Mailer/AuthCodeMailer.php similarity index 98% rename from src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php rename to src/Wallabag/CoreBundle/Mailer/AuthCodeMailer.php index 7e355effe..c0d70c6dd 100644 --- a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php +++ b/src/Wallabag/CoreBundle/Mailer/AuthCodeMailer.php @@ -1,6 +1,6 @@ Date: Sat, 30 Dec 2023 23:54:25 +0100 Subject: [PATCH 16/38] Move User event listeners to Core --- app/config/services.yml | 4 ++-- .../Event/Listener}/AuthenticationFailureListener.php | 2 +- .../Event/Listener}/CreateConfigListener.php | 2 +- .../Event/Listener}/PasswordResettingListener.php | 2 +- .../Event/Listener}/RegistrationListener.php | 2 +- .../Event/Listener}/AuthenticationFailureListenerTest.php | 4 ++-- .../Event/Listener}/CreateConfigListenerTest.php | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) rename src/Wallabag/{UserBundle/EventListener => CoreBundle/Event/Listener}/AuthenticationFailureListener.php (96%) rename src/Wallabag/{UserBundle/EventListener => CoreBundle/Event/Listener}/CreateConfigListener.php (98%) rename src/Wallabag/{UserBundle/EventListener => CoreBundle/Event/Listener}/PasswordResettingListener.php (95%) rename src/Wallabag/{UserBundle/EventListener => CoreBundle/Event/Listener}/RegistrationListener.php (96%) rename tests/Wallabag/{UserBundle/EventListener => CoreBundle/Event/Listener}/AuthenticationFailureListenerTest.php (94%) rename tests/Wallabag/{UserBundle/EventListener => CoreBundle/Event/Listener}/CreateConfigListenerTest.php (94%) diff --git a/app/config/services.yml b/app/config/services.yml index 0b14770db..c62ad0de2 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -328,7 +328,7 @@ services: confirmation: '%fos_user.registration.confirmation.from_email%' resetting: '%fos_user.resetting.email.from_email%' - Wallabag\UserBundle\EventListener\CreateConfigListener: + Wallabag\CoreBundle\Event\Listener\CreateConfigListener: arguments: $itemsOnPage: "%wallabag_core.items_on_page%" $feedLimit: "%wallabag_core.feed_limit%" @@ -338,7 +338,7 @@ services: $listMode: "%wallabag_core.list_mode%" $displayThumbnails: "%wallabag_core.display_thumbnails%" - Wallabag\UserBundle\EventListener\AuthenticationFailureListener: + Wallabag\CoreBundle\Event\Listener\AuthenticationFailureListener: tags: - { name: kernel.event_listener, event: security.authentication.failure, method: onAuthenticationFailure } diff --git a/src/Wallabag/UserBundle/EventListener/AuthenticationFailureListener.php b/src/Wallabag/CoreBundle/Event/Listener/AuthenticationFailureListener.php similarity index 96% rename from src/Wallabag/UserBundle/EventListener/AuthenticationFailureListener.php rename to src/Wallabag/CoreBundle/Event/Listener/AuthenticationFailureListener.php index 20fbd2a7f..fefd700ed 100644 --- a/src/Wallabag/UserBundle/EventListener/AuthenticationFailureListener.php +++ b/src/Wallabag/CoreBundle/Event/Listener/AuthenticationFailureListener.php @@ -1,6 +1,6 @@ Date: Sat, 30 Dec 2023 23:55:09 +0100 Subject: [PATCH 17/38] Remove unused template file --- .../Resources/views/manage.html.twig | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 src/Wallabag/UserBundle/Resources/views/manage.html.twig diff --git a/src/Wallabag/UserBundle/Resources/views/manage.html.twig b/src/Wallabag/UserBundle/Resources/views/manage.html.twig deleted file mode 100644 index 981e19aaa..000000000 --- a/src/Wallabag/UserBundle/Resources/views/manage.html.twig +++ /dev/null @@ -1,43 +0,0 @@ -{% extends "@WallabagCore/layout.html.twig" %} - -{% block title %}{{ 'user.manage.page_title'|trans }}{% endblock %} - -{% block content %} - -
-
-
-
-
-

{{ 'user.manage.description'|trans|raw }}

- - - - - - - - - - - - - - {% for user in users %} - - - - - - - - {% endfor %} - -
{{ 'user.manage.field.username'|trans }}{{ 'user.manage.field.email'|trans }}{{ 'user.manage.field.last_login'|trans }}{{ 'user.manage.field.locked'|trans }}{{ 'user.manage.action'|trans }}
{{ user.username }}{{ user.email }}{{ user.lastLogin|date('d/m/Y H:i:s') }}{{ user.locked ? 'yes' : 'no' }}edit - delete
-
-
-
-
-
- -{% endblock %} From 0234aa1acffcf8837e93717d18101accb19cdbec Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sat, 30 Dec 2023 23:58:23 +0100 Subject: [PATCH 18/38] Move User templates to Core --- app/config/config.yml | 4 ++-- src/Wallabag/CoreBundle/Controller/UserController.php | 6 +++--- src/Wallabag/CoreBundle/Mailer/AuthCodeMailer.php | 2 +- .../Resources/views/Authentication/form.html.twig | 0 .../views/Resetting/passwordAlreadyRequested.html.twig | 0 .../Resources/views/TwoFactor/email_auth_code.html.twig | 0 .../Resources/views/User/edit.html.twig | 0 .../Resources/views/User/index.html.twig | 0 .../Resources/views/User/new.html.twig | 0 tests/Wallabag/CoreBundle/Mailer/AuthCodeMailerTest.php | 2 +- 10 files changed, 7 insertions(+), 7 deletions(-) rename src/Wallabag/{UserBundle => CoreBundle}/Resources/views/Authentication/form.html.twig (100%) rename src/Wallabag/{UserBundle => CoreBundle}/Resources/views/Resetting/passwordAlreadyRequested.html.twig (100%) rename src/Wallabag/{UserBundle => CoreBundle}/Resources/views/TwoFactor/email_auth_code.html.twig (100%) rename src/Wallabag/{UserBundle => CoreBundle}/Resources/views/User/edit.html.twig (100%) rename src/Wallabag/{UserBundle => CoreBundle}/Resources/views/User/index.html.twig (100%) rename src/Wallabag/{UserBundle => CoreBundle}/Resources/views/User/new.html.twig (100%) diff --git a/app/config/config.yml b/app/config/config.yml index 386aefb99..e465a013f 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -194,13 +194,13 @@ scheb_two_factor: google: enabled: true issuer: "%server_name%" - template: "@WallabagUser/Authentication/form.html.twig" + template: "@WallabagCore/Authentication/form.html.twig" email: enabled: true sender_email: "%twofactor_sender%" digits: 6 - template: "@WallabagUser/Authentication/form.html.twig" + template: "@WallabagCore/Authentication/form.html.twig" mailer: Wallabag\CoreBundle\Mailer\AuthCodeMailer rulerz: diff --git a/src/Wallabag/CoreBundle/Controller/UserController.php b/src/Wallabag/CoreBundle/Controller/UserController.php index 525a6431c..fbe230ba0 100644 --- a/src/Wallabag/CoreBundle/Controller/UserController.php +++ b/src/Wallabag/CoreBundle/Controller/UserController.php @@ -67,7 +67,7 @@ class UserController extends AbstractController return $this->redirectToRoute('user_edit', ['id' => $user->getId()]); } - return $this->render('@WallabagUser/User/new.html.twig', [ + return $this->render('@WallabagCore/User/new.html.twig', [ 'user' => $user, 'form' => $form->createView(), ]); @@ -108,7 +108,7 @@ class UserController extends AbstractController return $this->redirectToRoute('user_edit', ['id' => $user->getId()]); } - return $this->render('@WallabagUser/User/edit.html.twig', [ + return $this->render('@WallabagCore/User/edit.html.twig', [ 'user' => $user, 'edit_form' => $form->createView(), 'delete_form' => $deleteForm->createView(), @@ -173,7 +173,7 @@ class UserController extends AbstractController } } - return $this->render('@WallabagUser/User/index.html.twig', [ + return $this->render('@WallabagCore/User/index.html.twig', [ 'searchForm' => $form->createView(), 'users' => $pagerFanta, ]); diff --git a/src/Wallabag/CoreBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/CoreBundle/Mailer/AuthCodeMailer.php index c0d70c6dd..823ef4187 100644 --- a/src/Wallabag/CoreBundle/Mailer/AuthCodeMailer.php +++ b/src/Wallabag/CoreBundle/Mailer/AuthCodeMailer.php @@ -78,7 +78,7 @@ class AuthCodeMailer implements AuthCodeMailerInterface */ public function sendAuthCode(TwoFactorInterface $user): void { - $template = $this->twig->load('@WallabagUser/TwoFactor/email_auth_code.html.twig'); + $template = $this->twig->load('@WallabagCore/TwoFactor/email_auth_code.html.twig'); $subject = $template->renderBlock('subject', []); $bodyHtml = $template->renderBlock('body_html', [ diff --git a/src/Wallabag/UserBundle/Resources/views/Authentication/form.html.twig b/src/Wallabag/CoreBundle/Resources/views/Authentication/form.html.twig similarity index 100% rename from src/Wallabag/UserBundle/Resources/views/Authentication/form.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Authentication/form.html.twig diff --git a/src/Wallabag/UserBundle/Resources/views/Resetting/passwordAlreadyRequested.html.twig b/src/Wallabag/CoreBundle/Resources/views/Resetting/passwordAlreadyRequested.html.twig similarity index 100% rename from src/Wallabag/UserBundle/Resources/views/Resetting/passwordAlreadyRequested.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Resetting/passwordAlreadyRequested.html.twig diff --git a/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig b/src/Wallabag/CoreBundle/Resources/views/TwoFactor/email_auth_code.html.twig similarity index 100% rename from src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig rename to src/Wallabag/CoreBundle/Resources/views/TwoFactor/email_auth_code.html.twig diff --git a/src/Wallabag/UserBundle/Resources/views/User/edit.html.twig b/src/Wallabag/CoreBundle/Resources/views/User/edit.html.twig similarity index 100% rename from src/Wallabag/UserBundle/Resources/views/User/edit.html.twig rename to src/Wallabag/CoreBundle/Resources/views/User/edit.html.twig diff --git a/src/Wallabag/UserBundle/Resources/views/User/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/User/index.html.twig similarity index 100% rename from src/Wallabag/UserBundle/Resources/views/User/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/User/index.html.twig diff --git a/src/Wallabag/UserBundle/Resources/views/User/new.html.twig b/src/Wallabag/CoreBundle/Resources/views/User/new.html.twig similarity index 100% rename from src/Wallabag/UserBundle/Resources/views/User/new.html.twig rename to src/Wallabag/CoreBundle/Resources/views/User/new.html.twig diff --git a/tests/Wallabag/CoreBundle/Mailer/AuthCodeMailerTest.php b/tests/Wallabag/CoreBundle/Mailer/AuthCodeMailerTest.php index 497fdb833..70db27904 100644 --- a/tests/Wallabag/CoreBundle/Mailer/AuthCodeMailerTest.php +++ b/tests/Wallabag/CoreBundle/Mailer/AuthCodeMailerTest.php @@ -22,7 +22,7 @@ class AuthCodeMailerTest extends TestCase {% block body_text %}text body {{ support_url }}{% endblock %} TWIG; - $this->twig = new Environment(new ArrayLoader(['@WallabagUser/TwoFactor/email_auth_code.html.twig' => $twigTemplate])); + $this->twig = new Environment(new ArrayLoader(['@WallabagCore/TwoFactor/email_auth_code.html.twig' => $twigTemplate])); } public function testSendEmail() From 7f8b806b8c51840592adf922ff9a463688e9cb46 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sat, 30 Dec 2023 23:59:25 +0100 Subject: [PATCH 19/38] Remove UserBundle --- app/AppKernel.php | 1 - app/config/services.yml | 4 ---- .../DependencyInjection/Configuration.php | 14 ------------- .../WallabagUserExtension.php | 20 ------------------- .../UserBundle/WallabagUserBundle.php | 9 --------- 5 files changed, 48 deletions(-) delete mode 100644 src/Wallabag/UserBundle/DependencyInjection/Configuration.php delete mode 100644 src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php delete mode 100644 src/Wallabag/UserBundle/WallabagUserBundle.php diff --git a/app/AppKernel.php b/app/AppKernel.php index 30d035075..69c6db574 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -39,7 +39,6 @@ class AppKernel extends Kernel // wallabag bundles new Wallabag\CoreBundle\WallabagCoreBundle(), new Wallabag\ApiBundle\WallabagApiBundle(), - new Wallabag\UserBundle\WallabagUserBundle(), new Wallabag\ImportBundle\WallabagImportBundle(), ]; diff --git a/app/config/services.yml b/app/config/services.yml index c62ad0de2..3549e5def 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -119,10 +119,6 @@ services: resource: '../../src/Wallabag/ImportBundle/*' exclude: '../../src/Wallabag/ImportBundle/{Consumer,Controller,Redis}' - Wallabag\UserBundle\: - resource: '../../src/Wallabag/UserBundle/*' - exclude: '../../src/Wallabag/UserBundle/{Controller,Entity,DataFixtures}' - Doctrine\DBAL\Connection: alias: doctrine.dbal.default_connection diff --git a/src/Wallabag/UserBundle/DependencyInjection/Configuration.php b/src/Wallabag/UserBundle/DependencyInjection/Configuration.php deleted file mode 100644 index e5f785368..000000000 --- a/src/Wallabag/UserBundle/DependencyInjection/Configuration.php +++ /dev/null @@ -1,14 +0,0 @@ -processConfiguration($configuration, $configs); - } - - public function getAlias() - { - return 'wallabag_user'; - } -} diff --git a/src/Wallabag/UserBundle/WallabagUserBundle.php b/src/Wallabag/UserBundle/WallabagUserBundle.php deleted file mode 100644 index e6e650423..000000000 --- a/src/Wallabag/UserBundle/WallabagUserBundle.php +++ /dev/null @@ -1,9 +0,0 @@ - Date: Sun, 31 Dec 2023 00:43:00 +0100 Subject: [PATCH 20/38] Remove unused routing file --- .../Resources/config/routing_rest.yml | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/Wallabag/ApiBundle/Resources/config/routing_rest.yml diff --git a/src/Wallabag/ApiBundle/Resources/config/routing_rest.yml b/src/Wallabag/ApiBundle/Resources/config/routing_rest.yml deleted file mode 100644 index de592c217..000000000 --- a/src/Wallabag/ApiBundle/Resources/config/routing_rest.yml +++ /dev/null @@ -1,39 +0,0 @@ -entry: - type: rest - resource: 'Wallabag\ApiBundle\Controller\EntryRestController' - name_prefix: api_ - -search: - type: rest - resource: 'Wallabag\ApiBundle\Controller\SearchRestController' - name_prefix: api_ - -tag: - type: rest - resource: 'Wallabag\ApiBundle\Controller\TagRestController' - name_prefix: api_ - -tagging_rule: - type: rest - resource: 'Wallabag\ApiBundle\Controller\TaggingRuleRestController' - name_prefix: api_ - -annotation: - type: rest - resource: 'Wallabag\ApiBundle\Controller\AnnotationRestController' - name_prefix: api_ - -misc: - type: rest - resource: 'Wallabag\ApiBundle\Controller\WallabagRestController' - name_prefix: api_ - -user: - type: rest - resource: 'Wallabag\ApiBundle\Controller\UserRestController' - name_prefix: api_ - -config: - type: rest - resource: 'Wallabag\ApiBundle\Controller\ConfigRestController' - name_prefix: api_ From 3fc0b5fa5b4ba7e266612e0be97bc68cc613d862 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sun, 31 Dec 2023 09:28:37 +0100 Subject: [PATCH 21/38] Move Api controllers to Core --- app/config/routing.yml | 5 ----- app/config/services.yml | 4 ---- .../CoreBundle/Controller/AnnotationController.php | 8 ++++---- .../Controller/Api}/AnnotationRestController.php | 2 +- .../Controller/Api}/ConfigRestController.php | 2 +- .../Controller/Api}/DeveloperController.php | 2 +- .../Controller/Api}/EntryRestController.php | 2 +- .../Controller/Api}/SearchRestController.php | 2 +- .../Controller/Api}/TagRestController.php | 2 +- .../Controller/Api}/TaggingRuleRestController.php | 2 +- .../Controller/Api}/UserRestController.php | 2 +- .../Controller/Api}/WallabagRestController.php | 2 +- .../Controller/Api}/ConfigRestControllerTest.php | 4 +--- .../Controller/Api}/DeveloperControllerTest.php | 2 +- .../Controller/Api}/EntryRestControllerTest.php | 3 +-- .../Controller/Api}/SearchRestControllerTest.php | 4 +--- .../Controller/Api}/TagRestControllerTest.php | 3 +-- .../Controller/Api}/TaggingRuleRestControllerTest.php | 4 +--- .../Controller/Api}/UserRestControllerTest.php | 3 +-- .../Controller/Api}/WallabagApiTestCase.php | 2 +- .../Controller/Api}/WallabagRestControllerTest.php | 3 +-- 21 files changed, 22 insertions(+), 41 deletions(-) rename src/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/AnnotationRestController.php (99%) rename src/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/ConfigRestController.php (96%) rename src/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/DeveloperController.php (98%) rename src/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/EntryRestController.php (99%) rename src/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/SearchRestController.php (98%) rename src/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/TagRestController.php (99%) rename src/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/TaggingRuleRestController.php (97%) rename src/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/UserRestController.php (99%) rename src/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/WallabagRestController.php (99%) rename tests/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/ConfigRestControllerTest.php (94%) rename tests/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/DeveloperControllerTest.php (98%) rename tests/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/EntryRestControllerTest.php (99%) rename tests/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/SearchRestControllerTest.php (96%) rename tests/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/TagRestControllerTest.php (98%) rename tests/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/TaggingRuleRestControllerTest.php (79%) rename tests/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/UserRestControllerTest.php (98%) rename tests/Wallabag/{ApiBundle => CoreBundle/Controller/Api}/WallabagApiTestCase.php (97%) rename tests/Wallabag/{ApiBundle/Controller => CoreBundle/Controller/Api}/WallabagRestControllerTest.php (95%) diff --git a/app/config/routing.yml b/app/config/routing.yml index 205fe8230..ec57effa2 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -3,11 +3,6 @@ wallabag_import: type: annotation prefix: /import -wallabag_api: - resource: "@WallabagApiBundle/Controller/" - type: annotation - prefix: / - app: resource: "@WallabagCoreBundle/Controller/" type: annotation diff --git a/app/config/services.yml b/app/config/services.yml index 3549e5def..14bfa3123 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -42,10 +42,6 @@ services: # controllers are imported separately to make sure services can be injected # as action arguments even if you don't extend any base controller class - Wallabag\ApiBundle\Controller\: - resource: '../../src/Wallabag/ApiBundle/Controller/' - tags: ['controller.service_arguments'] - Wallabag\CoreBundle\Controller\: resource: '../../src/Wallabag/CoreBundle/Controller/' tags: ['controller.service_arguments'] diff --git a/src/Wallabag/CoreBundle/Controller/AnnotationController.php b/src/Wallabag/CoreBundle/Controller/AnnotationController.php index fa7cc218a..aa48ac095 100644 --- a/src/Wallabag/CoreBundle/Controller/AnnotationController.php +++ b/src/Wallabag/CoreBundle/Controller/AnnotationController.php @@ -33,7 +33,7 @@ class AnnotationController extends AbstractFOSRestController /** * Retrieve annotations for an entry. * - * @see Wallabag\ApiBundle\Controller\WallabagRestController + * @see Api\WallabagRestController * * @Route("/annotations/{entry}.{_format}", methods={"GET"}, name="annotations_get_annotations", defaults={"_format": "json"}) * @@ -54,7 +54,7 @@ class AnnotationController extends AbstractFOSRestController /** * Creates a new annotation. * - * @see Wallabag\ApiBundle\Controller\WallabagRestController + * @see Api\WallabagRestController * * @Route("/annotations/{entry}.{_format}", methods={"POST"}, name="annotations_post_annotation", defaults={"_format": "json"}) * @@ -88,7 +88,7 @@ class AnnotationController extends AbstractFOSRestController /** * Updates an annotation. * - * @see Wallabag\ApiBundle\Controller\WallabagRestController + * @see Api\WallabagRestController * * @Route("/annotations/{annotation}.{_format}", methods={"PUT"}, name="annotations_put_annotation", defaults={"_format": "json"}) * @@ -125,7 +125,7 @@ class AnnotationController extends AbstractFOSRestController /** * Removes an annotation. * - * @see Wallabag\ApiBundle\Controller\WallabagRestController + * @see Api\WallabagRestController * * @Route("/annotations/{annotation}.{_format}", methods={"DELETE"}, name="annotations_delete_annotation", defaults={"_format": "json"}) * diff --git a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php b/src/Wallabag/CoreBundle/Controller/Api/AnnotationRestController.php similarity index 99% rename from src/Wallabag/ApiBundle/Controller/AnnotationRestController.php rename to src/Wallabag/CoreBundle/Controller/Api/AnnotationRestController.php index 63a3857e5..6fe11bcc9 100644 --- a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php +++ b/src/Wallabag/CoreBundle/Controller/Api/AnnotationRestController.php @@ -1,6 +1,6 @@ Date: Sun, 31 Dec 2023 09:34:04 +0100 Subject: [PATCH 22/38] Move Api entities to Core --- app/config/config.yml | 8 ++++---- src/Wallabag/ApiBundle/Form/Type/ClientType.php | 2 +- src/Wallabag/ApiBundle/Repository/ClientRepository.php | 2 +- .../CoreBundle/Controller/Api/DeveloperController.php | 2 +- .../CoreBundle/Controller/Api/UserRestController.php | 2 +- .../CoreBundle/Controller/Api/WallabagRestController.php | 2 +- .../Entity => CoreBundle/Entity/Api}/AccessToken.php | 4 ++-- .../Entity => CoreBundle/Entity/Api}/ApplicationInfo.php | 2 +- .../Entity => CoreBundle/Entity/Api}/AuthCode.php | 4 ++-- .../Entity => CoreBundle/Entity/Api}/Client.php | 6 +++--- .../Entity => CoreBundle/Entity/Api}/RefreshToken.php | 4 ++-- src/Wallabag/CoreBundle/Entity/User.php | 6 +++--- .../CoreBundle/Controller/Api/DeveloperControllerTest.php | 2 +- 13 files changed, 23 insertions(+), 23 deletions(-) rename src/Wallabag/{ApiBundle/Entity => CoreBundle/Entity/Api}/AccessToken.php (87%) rename src/Wallabag/{ApiBundle/Entity => CoreBundle/Entity/Api}/ApplicationInfo.php (95%) rename src/Wallabag/{ApiBundle/Entity => CoreBundle/Entity/Api}/AuthCode.php (89%) rename src/Wallabag/{ApiBundle/Entity => CoreBundle/Entity/Api}/Client.php (89%) rename src/Wallabag/{ApiBundle/Entity => CoreBundle/Entity/Api}/RefreshToken.php (87%) diff --git a/app/config/config.yml b/app/config/config.yml index e465a013f..a53562f7d 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -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: diff --git a/src/Wallabag/ApiBundle/Form/Type/ClientType.php b/src/Wallabag/ApiBundle/Form/Type/ClientType.php index 3d00b2ac8..b45127ae9 100644 --- a/src/Wallabag/ApiBundle/Form/Type/ClientType.php +++ b/src/Wallabag/ApiBundle/Form/Type/ClientType.php @@ -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 { diff --git a/src/Wallabag/ApiBundle/Repository/ClientRepository.php b/src/Wallabag/ApiBundle/Repository/ClientRepository.php index 0c0b79786..ab9325836 100644 --- a/src/Wallabag/ApiBundle/Repository/ClientRepository.php +++ b/src/Wallabag/ApiBundle/Repository/ClientRepository.php @@ -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) diff --git a/src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php b/src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php index afad4bce0..1bc665763 100644 --- a/src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php +++ b/src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php @@ -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 { diff --git a/src/Wallabag/CoreBundle/Controller/Api/UserRestController.php b/src/Wallabag/CoreBundle/Controller/Api/UserRestController.php index 6a33b7c8b..8d59b0949 100644 --- a/src/Wallabag/CoreBundle/Controller/Api/UserRestController.php +++ b/src/Wallabag/CoreBundle/Controller/Api/UserRestController.php @@ -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; diff --git a/src/Wallabag/CoreBundle/Controller/Api/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/Api/WallabagRestController.php index 68339e5d1..094a7ec75 100644 --- a/src/Wallabag/CoreBundle/Controller/Api/WallabagRestController.php +++ b/src/Wallabag/CoreBundle/Controller/Api/WallabagRestController.php @@ -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 diff --git a/src/Wallabag/ApiBundle/Entity/AccessToken.php b/src/Wallabag/CoreBundle/Entity/Api/AccessToken.php similarity index 87% rename from src/Wallabag/ApiBundle/Entity/AccessToken.php rename to src/Wallabag/CoreBundle/Entity/Api/AccessToken.php index 29f81ccaf..564f95db5 100644 --- a/src/Wallabag/ApiBundle/Entity/AccessToken.php +++ b/src/Wallabag/CoreBundle/Entity/Api/AccessToken.php @@ -1,6 +1,6 @@ + * @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; diff --git a/tests/Wallabag/CoreBundle/Controller/Api/DeveloperControllerTest.php b/tests/Wallabag/CoreBundle/Controller/Api/DeveloperControllerTest.php index b98ae6e43..d96a20ca3 100644 --- a/tests/Wallabag/CoreBundle/Controller/Api/DeveloperControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/Api/DeveloperControllerTest.php @@ -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 { From 1bddf4ee191c0de7e4921aa4be742e9c3b554850 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sun, 31 Dec 2023 09:36:05 +0100 Subject: [PATCH 23/38] Move Api repository to Core --- src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php | 2 +- src/Wallabag/CoreBundle/Entity/Api/Client.php | 2 +- .../Repository/Api}/ClientRepository.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename src/Wallabag/{ApiBundle/Repository => CoreBundle/Repository/Api}/ClientRepository.php (94%) diff --git a/src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php b/src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php index 1bc665763..e0091f21f 100644 --- a/src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php +++ b/src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php @@ -9,9 +9,9 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\ApiBundle\Form\Type\ClientType; -use Wallabag\ApiBundle\Repository\ClientRepository; use Wallabag\CoreBundle\Controller\AbstractController; use Wallabag\CoreBundle\Entity\Api\Client; +use Wallabag\CoreBundle\Repository\Api\ClientRepository; class DeveloperController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Entity/Api/Client.php b/src/Wallabag/CoreBundle/Entity/Api/Client.php index 83461f5ce..6a18cb8b3 100644 --- a/src/Wallabag/CoreBundle/Entity/Api/Client.php +++ b/src/Wallabag/CoreBundle/Entity/Api/Client.php @@ -12,7 +12,7 @@ use Wallabag\CoreBundle\Entity\User; /** * @ORM\Table("oauth2_clients") - * @ORM\Entity(repositoryClass="Wallabag\ApiBundle\Repository\ClientRepository") + * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\Api\ClientRepository") */ class Client extends BaseClient { diff --git a/src/Wallabag/ApiBundle/Repository/ClientRepository.php b/src/Wallabag/CoreBundle/Repository/Api/ClientRepository.php similarity index 94% rename from src/Wallabag/ApiBundle/Repository/ClientRepository.php rename to src/Wallabag/CoreBundle/Repository/Api/ClientRepository.php index ab9325836..b991207e2 100644 --- a/src/Wallabag/ApiBundle/Repository/ClientRepository.php +++ b/src/Wallabag/CoreBundle/Repository/Api/ClientRepository.php @@ -1,6 +1,6 @@ Date: Sun, 31 Dec 2023 09:38:27 +0100 Subject: [PATCH 24/38] Move Api form type to Core --- src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php | 2 +- .../Form/Type => CoreBundle/Form/Type/Api}/ClientType.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/Wallabag/{ApiBundle/Form/Type => CoreBundle/Form/Type/Api}/ClientType.php (97%) diff --git a/src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php b/src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php index e0091f21f..34c162ea4 100644 --- a/src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php +++ b/src/Wallabag/CoreBundle/Controller/Api/DeveloperController.php @@ -8,9 +8,9 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ApiBundle\Form\Type\ClientType; use Wallabag\CoreBundle\Controller\AbstractController; use Wallabag\CoreBundle\Entity\Api\Client; +use Wallabag\CoreBundle\Form\Type\Api\ClientType; use Wallabag\CoreBundle\Repository\Api\ClientRepository; class DeveloperController extends AbstractController diff --git a/src/Wallabag/ApiBundle/Form/Type/ClientType.php b/src/Wallabag/CoreBundle/Form/Type/Api/ClientType.php similarity index 97% rename from src/Wallabag/ApiBundle/Form/Type/ClientType.php rename to src/Wallabag/CoreBundle/Form/Type/Api/ClientType.php index b45127ae9..a004c6af0 100644 --- a/src/Wallabag/ApiBundle/Form/Type/ClientType.php +++ b/src/Wallabag/CoreBundle/Form/Type/Api/ClientType.php @@ -1,6 +1,6 @@ Date: Sun, 31 Dec 2023 09:40:42 +0100 Subject: [PATCH 25/38] Remove ApiBundle --- app/AppKernel.php | 1 - app/config/services.yml | 4 ---- .../DependencyInjection/Configuration.php | 19 ------------------ .../WallabagApiExtension.php | 20 ------------------- src/Wallabag/ApiBundle/WallabagApiBundle.php | 9 --------- 5 files changed, 53 deletions(-) delete mode 100644 src/Wallabag/ApiBundle/DependencyInjection/Configuration.php delete mode 100644 src/Wallabag/ApiBundle/DependencyInjection/WallabagApiExtension.php delete mode 100644 src/Wallabag/ApiBundle/WallabagApiBundle.php diff --git a/app/AppKernel.php b/app/AppKernel.php index 69c6db574..98a17e095 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -38,7 +38,6 @@ class AppKernel extends Kernel // wallabag bundles new Wallabag\CoreBundle\WallabagCoreBundle(), - new Wallabag\ApiBundle\WallabagApiBundle(), new Wallabag\ImportBundle\WallabagImportBundle(), ]; diff --git a/app/config/services.yml b/app/config/services.yml index 14bfa3123..103e2c024 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -32,10 +32,6 @@ services: $supportUrl: '@=service(''craue_config'').get(''wallabag_support_url'')' $fonts: '%wallabag_core.fonts%' - Wallabag\ApiBundle\: - resource: '../../src/Wallabag/ApiBundle/*' - exclude: '../../src/Wallabag/ApiBundle/{Controller,Entity}' - Wallabag\CoreBundle\: resource: '../../src/Wallabag/CoreBundle/*' exclude: ['../../src/Wallabag/CoreBundle/{Controller,Entity,DataFixtures}', '../../src/Wallabag/CoreBundle/Event/*Event.php'] diff --git a/src/Wallabag/ApiBundle/DependencyInjection/Configuration.php b/src/Wallabag/ApiBundle/DependencyInjection/Configuration.php deleted file mode 100644 index 1f206d2d4..000000000 --- a/src/Wallabag/ApiBundle/DependencyInjection/Configuration.php +++ /dev/null @@ -1,19 +0,0 @@ -processConfiguration($configuration, $configs); - } - - public function getAlias() - { - return 'wallabag_api'; - } -} diff --git a/src/Wallabag/ApiBundle/WallabagApiBundle.php b/src/Wallabag/ApiBundle/WallabagApiBundle.php deleted file mode 100644 index 19d887aba..000000000 --- a/src/Wallabag/ApiBundle/WallabagApiBundle.php +++ /dev/null @@ -1,9 +0,0 @@ - Date: Sun, 31 Dec 2023 09:50:36 +0100 Subject: [PATCH 26/38] Move Import commands to Core --- app/config/services.yml | 2 +- .../Command => CoreBundle/Command/Import}/ImportCommand.php | 2 +- .../Command/Import}/RedisWorkerCommand.php | 2 +- .../Command => CoreBundle/Command/Import}/ImportCommandTest.php | 2 +- .../Command/Import}/RedisWorkerCommandTest.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename src/Wallabag/{ImportBundle/Command => CoreBundle/Command/Import}/ImportCommand.php (99%) rename src/Wallabag/{ImportBundle/Command => CoreBundle/Command/Import}/RedisWorkerCommand.php (97%) rename tests/Wallabag/{ImportBundle/Command => CoreBundle/Command/Import}/ImportCommandTest.php (98%) rename tests/Wallabag/{ImportBundle/Command => CoreBundle/Command/Import}/RedisWorkerCommandTest.php (97%) diff --git a/app/config/services.yml b/app/config/services.yml index 103e2c024..8d01f536b 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -299,7 +299,7 @@ services: tags: - { name: console.command, command: 'wallabag:tag:all' } - Wallabag\ImportBundle\Command\ImportCommand: + Wallabag\CoreBundle\Command\Import\ImportCommand: tags: - { name: console.command, command: 'wallabag:import' } diff --git a/src/Wallabag/ImportBundle/Command/ImportCommand.php b/src/Wallabag/CoreBundle/Command/Import/ImportCommand.php similarity index 99% rename from src/Wallabag/ImportBundle/Command/ImportCommand.php rename to src/Wallabag/CoreBundle/Command/Import/ImportCommand.php index 03b15a21b..78cead733 100644 --- a/src/Wallabag/ImportBundle/Command/ImportCommand.php +++ b/src/Wallabag/CoreBundle/Command/Import/ImportCommand.php @@ -1,6 +1,6 @@ Date: Sun, 31 Dec 2023 10:03:14 +0100 Subject: [PATCH 27/38] Move Import consumers to Core --- app/config/services.yml | 2 +- app/config/services_rabbit.yml | 26 +++++++++---------- app/config/services_redis.yml | 24 ++++++++--------- .../Consumer/AMQPEntryConsumer.php | 2 +- .../Consumer/AbstractConsumer.php | 2 +- .../Consumer/RabbitMQConsumerTotalProxy.php | 2 +- .../Consumer/RedisEntryConsumer.php | 2 +- .../Controller/ImportController.php | 2 +- .../Consumer/AMQPEntryConsumerTest.php | 4 +-- .../Consumer/RedisEntryConsumerTest.php | 4 +-- 10 files changed, 35 insertions(+), 35 deletions(-) rename src/Wallabag/{ImportBundle => CoreBundle}/Consumer/AMQPEntryConsumer.php (87%) rename src/Wallabag/{ImportBundle => CoreBundle}/Consumer/AbstractConsumer.php (98%) rename src/Wallabag/{ImportBundle => CoreBundle}/Consumer/RabbitMQConsumerTotalProxy.php (98%) rename src/Wallabag/{ImportBundle => CoreBundle}/Consumer/RedisEntryConsumer.php (95%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Consumer/AMQPEntryConsumerTest.php (98%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Consumer/RedisEntryConsumerTest.php (98%) diff --git a/app/config/services.yml b/app/config/services.yml index 8d01f536b..1cfae7c60 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -34,7 +34,7 @@ services: Wallabag\CoreBundle\: resource: '../../src/Wallabag/CoreBundle/*' - exclude: ['../../src/Wallabag/CoreBundle/{Controller,Entity,DataFixtures}', '../../src/Wallabag/CoreBundle/Event/*Event.php'] + exclude: ['../../src/Wallabag/CoreBundle/{Consumer,Controller,Entity,DataFixtures}', '../../src/Wallabag/CoreBundle/Event/*Event.php'] # controllers are imported separately to make sure services can be injected # as action arguments even if you don't extend any base controller class diff --git a/app/config/services_rabbit.yml b/app/config/services_rabbit.yml index 372323ab3..ca59a22cd 100644 --- a/app/config/services_rabbit.yml +++ b/app/config/services_rabbit.yml @@ -5,7 +5,7 @@ services: autoconfigure: true public: true - Wallabag\ImportBundle\Consumer\RabbitMQConsumerTotalProxy: + Wallabag\CoreBundle\Consumer\RabbitMQConsumerTotalProxy: arguments: $pocketConsumer: '@old_sound_rabbit_mq.import_pocket_consumer' $readabilityConsumer: '@old_sound_rabbit_mq.import_readability_consumer' @@ -21,61 +21,61 @@ services: $pocketHtmlConsumer: '@old_sound_rabbit_mq.import_pocket_html_consumer' wallabag_import.consumer.amqp.pocket: - class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer + class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\PocketImport' wallabag_import.consumer.amqp.readability: - class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer + class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\ReadabilityImport' wallabag_import.consumer.amqp.instapaper: - class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer + class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\InstapaperImport' wallabag_import.consumer.amqp.pinboard: - class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer + class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\PinboardImport' wallabag_import.consumer.amqp.delicious: - class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer + class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\DeliciousImport' wallabag_import.consumer.amqp.wallabag_v1: - class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer + class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\WallabagV1Import' wallabag_import.consumer.amqp.wallabag_v2: - class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer + class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\WallabagV2Import' wallabag_import.consumer.amqp.elcurator: - class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer + class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\ElcuratorImport' wallabag_import.consumer.amqp.firefox: - class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer + class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\FirefoxImport' wallabag_import.consumer.amqp.chrome: - class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer + class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\ChromeImport' wallabag_import.consumer.amqp.shaarli: - class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer + class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\ShaarliImport' wallabag_import.consumer.amqp.pocket_html: - class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer + class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\PocketHtmlImport' diff --git a/app/config/services_redis.yml b/app/config/services_redis.yml index 12e60f0bb..51c5194dd 100644 --- a/app/config/services_redis.yml +++ b/app/config/services_redis.yml @@ -17,7 +17,7 @@ services: - "@wallabag_import.queue.redis.readability" wallabag_import.consumer.redis.readability: - class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer + class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\ReadabilityImport' @@ -33,7 +33,7 @@ services: - "@wallabag_import.queue.redis.instapaper" wallabag_import.consumer.redis.instapaper: - class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer + class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\InstapaperImport' @@ -49,7 +49,7 @@ services: - "@wallabag_import.queue.redis.pinboard" wallabag_import.consumer.redis.pinboard: - class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer + class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\PinboardImport' @@ -65,7 +65,7 @@ services: - "@wallabag_import.queue.redis.delicious" wallabag_import.consumer.redis.delicious: - class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer + class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\DeliciousImport' @@ -81,7 +81,7 @@ services: - "@wallabag_import.queue.redis.pocket" wallabag_import.consumer.redis.pocket: - class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer + class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\PocketImport' @@ -97,7 +97,7 @@ services: - "@wallabag_import.queue.redis.wallabag_v1" wallabag_import.consumer.redis.wallabag_v1: - class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer + class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\WallabagV1Import' @@ -113,7 +113,7 @@ services: - "@wallabag_import.queue.redis.wallabag_v2" wallabag_import.consumer.redis.wallabag_v2: - class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer + class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\WallabagV2Import' @@ -129,7 +129,7 @@ services: - "@wallabag_import.queue.redis.elcurator" wallabag_import.consumer.redis.elcurator: - class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer + class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\ElcuratorImport' @@ -145,7 +145,7 @@ services: - "@wallabag_import.queue.redis.firefox" wallabag_import.consumer.redis.firefox: - class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer + class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\FirefoxImport' @@ -161,7 +161,7 @@ services: - "@wallabag_import.queue.redis.chrome" wallabag_import.consumer.redis.chrome: - class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer + class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\ChromeImport' @@ -177,7 +177,7 @@ services: - "@wallabag_import.queue.redis.shaarli" wallabag_import.consumer.redis.shaarli: - class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer + class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\ShaarliImport' @@ -193,6 +193,6 @@ services: - "@wallabag_import.queue.redis.pocket_html" wallabag_import.consumer.redis.pocket_html: - class: Wallabag\ImportBundle\Consumer\RedisEntryConsumer + class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\ImportBundle\Import\PocketHtmlImport' diff --git a/src/Wallabag/ImportBundle/Consumer/AMQPEntryConsumer.php b/src/Wallabag/CoreBundle/Consumer/AMQPEntryConsumer.php similarity index 87% rename from src/Wallabag/ImportBundle/Consumer/AMQPEntryConsumer.php rename to src/Wallabag/CoreBundle/Consumer/AMQPEntryConsumer.php index be64bef0d..b6fc18760 100644 --- a/src/Wallabag/ImportBundle/Consumer/AMQPEntryConsumer.php +++ b/src/Wallabag/CoreBundle/Consumer/AMQPEntryConsumer.php @@ -1,6 +1,6 @@ Date: Sun, 31 Dec 2023 12:25:57 +0100 Subject: [PATCH 28/38] Move Import controllers to Core --- app/config/routing.yml | 5 -- app/config/services.yml | 28 ++++---- phpstan-baseline.neon | 60 +++++++++--------- .../Controller/Import}/BrowserController.php | 4 +- .../Controller/Import}/ChromeController.php | 4 +- .../Import}/DeliciousController.php | 4 +- .../Import}/ElcuratorController.php | 4 +- .../Controller/Import}/FirefoxController.php | 4 +- .../Controller/Import}/HtmlController.php | 4 +- .../Controller/Import}/ImportController.php | 4 +- .../Import}/InstapaperController.php | 4 +- .../Controller/Import}/PinboardController.php | 4 +- .../Controller/Import}/PocketController.php | 8 +-- .../Import}/PocketHtmlController.php | 4 +- .../Import}/ReadabilityController.php | 4 +- .../Controller/Import}/ShaarliController.php | 4 +- .../Controller/Import}/WallabagController.php | 2 +- .../Import}/WallabagV1Controller.php | 4 +- .../Import}/WallabagV2Controller.php | 4 +- .../Resources/views/Import/index.html.twig | 2 +- .../Command/Import/ImportCommandTest.php | 4 +- .../Import}/ChromeControllerTest.php | 8 +-- .../Import}/DeliciousControllerTest.php | 10 +-- .../Import}/ElcuratorControllerTest.php | 6 +- .../Import}/FirefoxControllerTest.php | 8 +-- .../Import}/ImportControllerTest.php | 2 +- .../Import}/InstapaperControllerTest.php | 10 +-- .../Import}/PinboardControllerTest.php | 10 +-- .../Import}/PocketControllerTest.php | 2 +- .../Import}/PocketHtmlControllerTest.php | 8 +-- .../Import}/ReadabilityControllerTest.php | 10 +-- .../Import}/ShaarliControllerTest.php | 8 +-- .../Import}/WallabagV1ControllerTest.php | 10 +-- .../Import}/WallabagV2ControllerTest.php | 8 +-- .../fixtures/Import}/chrome-bookmarks | 0 .../delicious_export.2021.02.06_21.10.json | 0 .../fixtures/Import}/elcurator.json | 0 .../fixtures/Import}/firefox-bookmarks.json | 0 .../fixtures/Import}/instapaper-export.csv | 0 .../fixtures/Import}/pinboard_export | 0 .../fixtures/Import}/readability-read.json | 0 .../fixtures/Import}/readability.json | 0 .../fixtures/Import}/ril_export.html | 0 .../fixtures/Import}/shaarli-bookmarks.html | 0 .../fixtures/Import}/test.html | 0 .../fixtures/Import}/test.txt | 0 .../fixtures/Import}/unnamed.png | Bin .../fixtures/Import}/wallabag-v1-read.json | 0 .../fixtures/Import}/wallabag-v1.json | 0 .../fixtures/Import}/wallabag-v2-empty.json | 0 .../fixtures/Import}/wallabag-v2-read.json | 0 .../fixtures/Import}/wallabag-v2.json | 0 .../ImportBundle/Import/ChromeImportTest.php | 12 ++-- .../ImportBundle/Import/FirefoxImportTest.php | 12 ++-- .../Import/InstapaperImportTest.php | 12 ++-- .../Import/PocketHtmlImportTest.php | 12 ++-- .../Import/ReadabilityImportTest.php | 12 ++-- .../ImportBundle/Import/ShaarliImportTest.php | 12 ++-- .../Import/WallabagV1ImportTest.php | 12 ++-- .../Import/WallabagV2ImportTest.php | 16 ++--- 60 files changed, 178 insertions(+), 187 deletions(-) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/BrowserController.php (96%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/ChromeController.php (93%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/DeliciousController.php (96%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/ElcuratorController.php (93%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/FirefoxController.php (93%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/HtmlController.php (96%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/ImportController.php (97%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/InstapaperController.php (96%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/PinboardController.php (96%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/PocketController.php (95%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/PocketHtmlController.php (93%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/ReadabilityController.php (96%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/ShaarliController.php (93%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/WallabagController.php (98%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/WallabagV1Controller.php (93%) rename src/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/WallabagV2Controller.php (93%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/ChromeControllerTest.php (94%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/DeliciousControllerTest.php (92%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/ElcuratorControllerTest.php (94%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/FirefoxControllerTest.php (94%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/ImportControllerTest.php (93%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/InstapaperControllerTest.php (94%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/PinboardControllerTest.php (94%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/PocketControllerTest.php (98%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/PocketHtmlControllerTest.php (94%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/ReadabilityControllerTest.php (93%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/ShaarliControllerTest.php (94%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/WallabagV1ControllerTest.php (93%) rename tests/Wallabag/{ImportBundle/Controller => CoreBundle/Controller/Import}/WallabagV2ControllerTest.php (94%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/chrome-bookmarks (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/delicious_export.2021.02.06_21.10.json (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/elcurator.json (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/firefox-bookmarks.json (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/instapaper-export.csv (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/pinboard_export (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/readability-read.json (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/readability.json (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/ril_export.html (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/shaarli-bookmarks.html (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/test.html (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/test.txt (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/unnamed.png (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/wallabag-v1-read.json (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/wallabag-v1.json (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/wallabag-v2-empty.json (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/wallabag-v2-read.json (100%) rename tests/Wallabag/{ImportBundle/fixtures => CoreBundle/fixtures/Import}/wallabag-v2.json (100%) diff --git a/app/config/routing.yml b/app/config/routing.yml index ec57effa2..3cfaef516 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -1,8 +1,3 @@ -wallabag_import: - resource: "@WallabagImportBundle/Controller/" - type: annotation - prefix: /import - app: resource: "@WallabagCoreBundle/Controller/" type: annotation diff --git a/app/config/services.yml b/app/config/services.yml index 1cfae7c60..6194edee8 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -42,67 +42,63 @@ services: resource: '../../src/Wallabag/CoreBundle/Controller/' tags: ['controller.service_arguments'] - Wallabag\ImportBundle\Controller\: - resource: '../../src/Wallabag/ImportBundle/Controller/' - tags: ['controller.service_arguments'] - # inject alias service into controllers - Wallabag\ImportBundle\Controller\ChromeController: + Wallabag\CoreBundle\Controller\Import\ChromeController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_chrome_producer' $redisProducer: '@wallabag_import.producer.redis.chrome' - Wallabag\ImportBundle\Controller\DeliciousController: + Wallabag\CoreBundle\Controller\Import\DeliciousController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_delicious_producer' $redisProducer: '@wallabag_import.producer.redis.delicious' - Wallabag\ImportBundle\Controller\ElcuratorController: + Wallabag\CoreBundle\Controller\Import\ElcuratorController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_elcurator_producer' $redisProducer: '@wallabag_import.producer.redis.elcurator' - Wallabag\ImportBundle\Controller\FirefoxController: + Wallabag\CoreBundle\Controller\Import\FirefoxController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_firefox_producer' $redisProducer: '@wallabag_import.producer.redis.firefox' - Wallabag\ImportBundle\Controller\InstapaperController: + Wallabag\CoreBundle\Controller\Import\InstapaperController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_instapaper_producer' $redisProducer: '@wallabag_import.producer.redis.instapaper' - Wallabag\ImportBundle\Controller\PinboardController: + Wallabag\CoreBundle\Controller\Import\PinboardController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_pinboard_producer' $redisProducer: '@wallabag_import.producer.redis.pinboard' - Wallabag\ImportBundle\Controller\PocketController: + Wallabag\CoreBundle\Controller\Import\PocketController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_pocket_producer' $redisProducer: '@wallabag_import.producer.redis.pocket' - Wallabag\ImportBundle\Controller\ReadabilityController: + Wallabag\CoreBundle\Controller\Import\ReadabilityController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_readability_producer' $redisProducer: '@wallabag_import.producer.redis.readability' - Wallabag\ImportBundle\Controller\WallabagV1Controller: + Wallabag\CoreBundle\Controller\Import\WallabagV1Controller: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_wallabag_v1_producer' $redisProducer: '@wallabag_import.producer.redis.wallabag_v1' - Wallabag\ImportBundle\Controller\WallabagV2Controller: + Wallabag\CoreBundle\Controller\Import\WallabagV2Controller: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_wallabag_v2_producer' $redisProducer: '@wallabag_import.producer.redis.wallabag_v2' - Wallabag\ImportBundle\Controller\ShaarliController: + Wallabag\CoreBundle\Controller\Import\ShaarliController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_shaarli_producer' $redisProducer: '@wallabag_import.producer.redis.shaarli' - Wallabag\ImportBundle\Controller\PocketHtmlController: + Wallabag\CoreBundle\Controller\Import\PocketHtmlController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_pocket_html_producer' $redisProducer: '@wallabag_import.producer.redis.pocket_html' diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 97a244c70..dab2030fe 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -20,6 +20,36 @@ parameters: count: 6 path: src/Wallabag/CoreBundle/Controller/ConfigController.php + - + message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" + count: 1 + path: src/Wallabag/CoreBundle/Controller/Import/BrowserController.php + + - + message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" + count: 1 + path: src/Wallabag/CoreBundle/Controller/Import/BrowserController.php + + - + message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" + count: 1 + path: src/Wallabag/CoreBundle/Controller/Import/HtmlController.php + + - + message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" + count: 1 + path: src/Wallabag/CoreBundle/Controller/Import/HtmlController.php + + - + message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" + count: 1 + path: src/Wallabag/CoreBundle/Controller/Import/WallabagController.php + + - + message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" + count: 1 + path: src/Wallabag/CoreBundle/Controller/Import/WallabagController.php + - message: "#^Call to an undefined method Spiriit\\\\Bundle\\\\FormFilterBundle\\\\Filter\\\\Query\\\\QueryInterface\\:\\:getExpressionBuilder\\(\\)\\.$#" count: 1 @@ -40,36 +70,6 @@ parameters: count: 1 path: src/Wallabag/CoreBundle/Mailer/UserMailer.php - - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Controller/BrowserController.php - - - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Controller/BrowserController.php - - - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Controller/HtmlController.php - - - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Controller/HtmlController.php - - - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Controller/WallabagController.php - - - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Controller/WallabagController.php - - message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#" count: 1 diff --git a/src/Wallabag/ImportBundle/Controller/BrowserController.php b/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php similarity index 96% rename from src/Wallabag/ImportBundle/Controller/BrowserController.php rename to src/Wallabag/CoreBundle/Controller/Import/BrowserController.php index 8658b6422..0288e1243 100644 --- a/src/Wallabag/ImportBundle/Controller/BrowserController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php @@ -1,6 +1,6 @@ execute([ 'username' => 'admin', - 'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/Wallabag/ImportBundle/fixtures/wallabag-v2-read.json', + 'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v2-read.json', '--importer' => 'v2', ]); @@ -83,7 +83,7 @@ class ImportCommandTest extends WallabagCoreTestCase $tester = new CommandTester($command); $tester->execute([ 'username' => $this->getLoggedInUserId(), - 'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/Wallabag/ImportBundle/fixtures/wallabag-v2-read.json', + 'filepath' => $application->getKernel()->getContainer()->getParameter('kernel.project_dir') . '/tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v2-read.json', '--useUserId' => true, '--importer' => 'v2', ]); diff --git a/tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php b/tests/Wallabag/CoreBundle/Controller/Import/ChromeControllerTest.php similarity index 94% rename from tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/Import/ChromeControllerTest.php index b7625dc16..229df53a0 100644 --- a/tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/Import/ChromeControllerTest.php @@ -1,6 +1,6 @@ filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/chrome-bookmarks', 'Bookmarks'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/chrome-bookmarks', 'Bookmarks'); $data = [ 'upload_import_file[file]' => $file, @@ -99,7 +99,7 @@ class ChromeControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/chrome'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/chrome-bookmarks', 'Bookmarks'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/chrome-bookmarks', 'Bookmarks'); $data = [ 'upload_import_file[file]' => $file, @@ -140,7 +140,7 @@ class ChromeControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/chrome'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt'); $data = [ 'upload_import_file[file]' => $file, diff --git a/tests/Wallabag/ImportBundle/Controller/DeliciousControllerTest.php b/tests/Wallabag/CoreBundle/Controller/Import/DeliciousControllerTest.php similarity index 92% rename from tests/Wallabag/ImportBundle/Controller/DeliciousControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/Import/DeliciousControllerTest.php index 1aa4d90af..bba9d06f7 100644 --- a/tests/Wallabag/ImportBundle/Controller/DeliciousControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/Import/DeliciousControllerTest.php @@ -1,6 +1,6 @@ filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/delicious_export.2021.02.06_21.10.json', 'delicious.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/delicious_export.2021.02.06_21.10.json', 'delicious.json'); $data = [ 'upload_import_file[file]' => $file, @@ -99,7 +99,7 @@ class DeliciousControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/delicious'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/delicious_export.2021.02.06_21.10.json', 'delicious.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/delicious_export.2021.02.06_21.10.json', 'delicious.json'); $data = [ 'upload_import_file[file]' => $file, @@ -140,7 +140,7 @@ class DeliciousControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/delicious'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/delicious_export.2021.02.06_21.10.json', 'delicious-read.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/delicious_export.2021.02.06_21.10.json', 'delicious-read.json'); $data = [ 'upload_import_file[file]' => $file, @@ -185,7 +185,7 @@ class DeliciousControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/delicious'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt'); $data = [ 'upload_import_file[file]' => $file, diff --git a/tests/Wallabag/ImportBundle/Controller/ElcuratorControllerTest.php b/tests/Wallabag/CoreBundle/Controller/Import/ElcuratorControllerTest.php similarity index 94% rename from tests/Wallabag/ImportBundle/Controller/ElcuratorControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/Import/ElcuratorControllerTest.php index 38c872774..0ffb93df9 100644 --- a/tests/Wallabag/ImportBundle/Controller/ElcuratorControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/Import/ElcuratorControllerTest.php @@ -1,6 +1,6 @@ filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/elcurator.json', 'elcurator.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/elcurator.json', 'elcurator.json'); $data = [ 'upload_import_file[file]' => $file, @@ -100,7 +100,7 @@ class ElcuratorControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/elcurator'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/elcurator.json', 'elcurator.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/elcurator.json', 'elcurator.json'); $data = [ 'upload_import_file[file]' => $file, diff --git a/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php b/tests/Wallabag/CoreBundle/Controller/Import/FirefoxControllerTest.php similarity index 94% rename from tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/Import/FirefoxControllerTest.php index 0e2c5b0ed..0e53aeb66 100644 --- a/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/Import/FirefoxControllerTest.php @@ -1,6 +1,6 @@ filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/firefox-bookmarks.json', 'Bookmarks'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/firefox-bookmarks.json', 'Bookmarks'); $data = [ 'upload_import_file[file]' => $file, @@ -99,7 +99,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/firefox'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/firefox-bookmarks.json', 'Bookmarks'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/firefox-bookmarks.json', 'Bookmarks'); $data = [ 'upload_import_file[file]' => $file, @@ -154,7 +154,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/firefox'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt'); $data = [ 'upload_import_file[file]' => $file, diff --git a/tests/Wallabag/ImportBundle/Controller/ImportControllerTest.php b/tests/Wallabag/CoreBundle/Controller/Import/ImportControllerTest.php similarity index 93% rename from tests/Wallabag/ImportBundle/Controller/ImportControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/Import/ImportControllerTest.php index b5b220b50..7c6756834 100644 --- a/tests/Wallabag/ImportBundle/Controller/ImportControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/Import/ImportControllerTest.php @@ -1,6 +1,6 @@ filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/instapaper-export.csv', 'instapaper.csv'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/instapaper-export.csv', 'instapaper.csv'); $data = [ 'upload_import_file[file]' => $file, @@ -99,7 +99,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/instapaper'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/instapaper-export.csv', 'instapaper.csv'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/instapaper-export.csv', 'instapaper.csv'); $data = [ 'upload_import_file[file]' => $file, @@ -153,7 +153,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/instapaper'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/instapaper-export.csv', 'instapaper-read.csv'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/instapaper-export.csv', 'instapaper-read.csv'); $data = [ 'upload_import_file[file]' => $file, @@ -198,7 +198,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/instapaper'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt'); $data = [ 'upload_import_file[file]' => $file, diff --git a/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php b/tests/Wallabag/CoreBundle/Controller/Import/PinboardControllerTest.php similarity index 94% rename from tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/Import/PinboardControllerTest.php index 833061fe8..53924993d 100644 --- a/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/Import/PinboardControllerTest.php @@ -1,6 +1,6 @@ filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/pinboard_export', 'pinboard.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/pinboard_export', 'pinboard.json'); $data = [ 'upload_import_file[file]' => $file, @@ -99,7 +99,7 @@ class PinboardControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/pinboard'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/pinboard_export', 'pinboard.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/pinboard_export', 'pinboard.json'); $data = [ 'upload_import_file[file]' => $file, @@ -145,7 +145,7 @@ class PinboardControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/pinboard'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/pinboard_export', 'pinboard-read.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/pinboard_export', 'pinboard-read.json'); $data = [ 'upload_import_file[file]' => $file, @@ -192,7 +192,7 @@ class PinboardControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/pinboard'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt'); $data = [ 'upload_import_file[file]' => $file, diff --git a/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php b/tests/Wallabag/CoreBundle/Controller/Import/PocketControllerTest.php similarity index 98% rename from tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/Import/PocketControllerTest.php index 858689ddd..644b5b7fb 100644 --- a/tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/Import/PocketControllerTest.php @@ -1,6 +1,6 @@ filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/ril_export.html', 'Bookmarks'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/ril_export.html', 'Bookmarks'); $data = [ 'upload_import_file[file]' => $file, @@ -99,7 +99,7 @@ class PocketHtmlControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/pocket_html'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/ril_export.html', 'Bookmarks'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/ril_export.html', 'Bookmarks'); $data = [ 'upload_import_file[file]' => $file, @@ -150,7 +150,7 @@ class PocketHtmlControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/pocket_html'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/test.html', 'test.html'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.html', 'test.html'); $data = [ 'upload_import_file[file]' => $file, diff --git a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php b/tests/Wallabag/CoreBundle/Controller/Import/ReadabilityControllerTest.php similarity index 93% rename from tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/Import/ReadabilityControllerTest.php index 7fa3b7f7f..fcf3bc901 100644 --- a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/Import/ReadabilityControllerTest.php @@ -1,6 +1,6 @@ filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/readability.json', 'readability.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/readability.json', 'readability.json'); $data = [ 'upload_import_file[file]' => $file, @@ -99,7 +99,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/readability'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/readability.json', 'readability.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/readability.json', 'readability.json'); $data = [ 'upload_import_file[file]' => $file, @@ -143,7 +143,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/readability'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/readability-read.json', 'readability-read.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/readability-read.json', 'readability-read.json'); $data = [ 'upload_import_file[file]' => $file, @@ -190,7 +190,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/readability'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt'); $data = [ 'upload_import_file[file]' => $file, diff --git a/tests/Wallabag/ImportBundle/Controller/ShaarliControllerTest.php b/tests/Wallabag/CoreBundle/Controller/Import/ShaarliControllerTest.php similarity index 94% rename from tests/Wallabag/ImportBundle/Controller/ShaarliControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/Import/ShaarliControllerTest.php index 8bc9ffb9d..c5c140d9e 100644 --- a/tests/Wallabag/ImportBundle/Controller/ShaarliControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/Import/ShaarliControllerTest.php @@ -1,6 +1,6 @@ filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/shaarli-bookmarks.html', 'Bookmarks'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/shaarli-bookmarks.html', 'Bookmarks'); $data = [ 'upload_import_file[file]' => $file, @@ -99,7 +99,7 @@ class ShaarliControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/shaarli'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/shaarli-bookmarks.html', 'Bookmarks'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/shaarli-bookmarks.html', 'Bookmarks'); $data = [ 'upload_import_file[file]' => $file, @@ -150,7 +150,7 @@ class ShaarliControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/shaarli'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/test.html', 'test.html'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.html', 'test.html'); $data = [ 'upload_import_file[file]' => $file, diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php b/tests/Wallabag/CoreBundle/Controller/Import/WallabagV1ControllerTest.php similarity index 93% rename from tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/Import/WallabagV1ControllerTest.php index 328cbc71c..5ebb29586 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/Import/WallabagV1ControllerTest.php @@ -1,6 +1,6 @@ filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/wallabag-v1.json', 'wallabag-v1.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/wallabag-v1.json', 'wallabag-v1.json'); $data = [ 'upload_import_file[file]' => $file, @@ -100,7 +100,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/wallabag-v1'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/wallabag-v1.json', 'wallabag-v1.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/wallabag-v1.json', 'wallabag-v1.json'); $data = [ 'upload_import_file[file]' => $file, @@ -144,7 +144,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/wallabag-v1'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/wallabag-v1-read.json', 'wallabag-v1-read.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/wallabag-v1-read.json', 'wallabag-v1-read.json'); $data = [ 'upload_import_file[file]' => $file, @@ -191,7 +191,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/wallabag-v1'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt'); $data = [ 'upload_import_file[file]' => $file, diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php b/tests/Wallabag/CoreBundle/Controller/Import/WallabagV2ControllerTest.php similarity index 94% rename from tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php rename to tests/Wallabag/CoreBundle/Controller/Import/WallabagV2ControllerTest.php index c12b0b3e9..d42f11424 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/Import/WallabagV2ControllerTest.php @@ -1,6 +1,6 @@ filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/wallabag-v2.json', 'wallabag-v2.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/wallabag-v2.json', 'wallabag-v2.json'); $data = [ 'upload_import_file[file]' => $file, @@ -100,7 +100,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/wallabag-v2'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/wallabag-v2.json', 'wallabag-v2.json'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/wallabag-v2.json', 'wallabag-v2.json'); $data = [ 'upload_import_file[file]' => $file, @@ -166,7 +166,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase $crawler = $client->request('GET', '/import/wallabag-v2'); $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form(); - $file = new UploadedFile(__DIR__ . '/../fixtures/test.txt', 'test.txt'); + $file = new UploadedFile(__DIR__ . '/../../fixtures/Import/test.txt', 'test.txt'); $data = [ 'upload_import_file[file]' => $file, diff --git a/tests/Wallabag/ImportBundle/fixtures/chrome-bookmarks b/tests/Wallabag/CoreBundle/fixtures/Import/chrome-bookmarks similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/chrome-bookmarks rename to tests/Wallabag/CoreBundle/fixtures/Import/chrome-bookmarks diff --git a/tests/Wallabag/ImportBundle/fixtures/delicious_export.2021.02.06_21.10.json b/tests/Wallabag/CoreBundle/fixtures/Import/delicious_export.2021.02.06_21.10.json similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/delicious_export.2021.02.06_21.10.json rename to tests/Wallabag/CoreBundle/fixtures/Import/delicious_export.2021.02.06_21.10.json diff --git a/tests/Wallabag/ImportBundle/fixtures/elcurator.json b/tests/Wallabag/CoreBundle/fixtures/Import/elcurator.json similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/elcurator.json rename to tests/Wallabag/CoreBundle/fixtures/Import/elcurator.json diff --git a/tests/Wallabag/ImportBundle/fixtures/firefox-bookmarks.json b/tests/Wallabag/CoreBundle/fixtures/Import/firefox-bookmarks.json similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/firefox-bookmarks.json rename to tests/Wallabag/CoreBundle/fixtures/Import/firefox-bookmarks.json diff --git a/tests/Wallabag/ImportBundle/fixtures/instapaper-export.csv b/tests/Wallabag/CoreBundle/fixtures/Import/instapaper-export.csv similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/instapaper-export.csv rename to tests/Wallabag/CoreBundle/fixtures/Import/instapaper-export.csv diff --git a/tests/Wallabag/ImportBundle/fixtures/pinboard_export b/tests/Wallabag/CoreBundle/fixtures/Import/pinboard_export similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/pinboard_export rename to tests/Wallabag/CoreBundle/fixtures/Import/pinboard_export diff --git a/tests/Wallabag/ImportBundle/fixtures/readability-read.json b/tests/Wallabag/CoreBundle/fixtures/Import/readability-read.json similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/readability-read.json rename to tests/Wallabag/CoreBundle/fixtures/Import/readability-read.json diff --git a/tests/Wallabag/ImportBundle/fixtures/readability.json b/tests/Wallabag/CoreBundle/fixtures/Import/readability.json similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/readability.json rename to tests/Wallabag/CoreBundle/fixtures/Import/readability.json diff --git a/tests/Wallabag/ImportBundle/fixtures/ril_export.html b/tests/Wallabag/CoreBundle/fixtures/Import/ril_export.html similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/ril_export.html rename to tests/Wallabag/CoreBundle/fixtures/Import/ril_export.html diff --git a/tests/Wallabag/ImportBundle/fixtures/shaarli-bookmarks.html b/tests/Wallabag/CoreBundle/fixtures/Import/shaarli-bookmarks.html similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/shaarli-bookmarks.html rename to tests/Wallabag/CoreBundle/fixtures/Import/shaarli-bookmarks.html diff --git a/tests/Wallabag/ImportBundle/fixtures/test.html b/tests/Wallabag/CoreBundle/fixtures/Import/test.html similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/test.html rename to tests/Wallabag/CoreBundle/fixtures/Import/test.html diff --git a/tests/Wallabag/ImportBundle/fixtures/test.txt b/tests/Wallabag/CoreBundle/fixtures/Import/test.txt similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/test.txt rename to tests/Wallabag/CoreBundle/fixtures/Import/test.txt diff --git a/tests/Wallabag/ImportBundle/fixtures/unnamed.png b/tests/Wallabag/CoreBundle/fixtures/Import/unnamed.png similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/unnamed.png rename to tests/Wallabag/CoreBundle/fixtures/Import/unnamed.png diff --git a/tests/Wallabag/ImportBundle/fixtures/wallabag-v1-read.json b/tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v1-read.json similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/wallabag-v1-read.json rename to tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v1-read.json diff --git a/tests/Wallabag/ImportBundle/fixtures/wallabag-v1.json b/tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v1.json similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/wallabag-v1.json rename to tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v1.json diff --git a/tests/Wallabag/ImportBundle/fixtures/wallabag-v2-empty.json b/tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v2-empty.json similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/wallabag-v2-empty.json rename to tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v2-empty.json diff --git a/tests/Wallabag/ImportBundle/fixtures/wallabag-v2-read.json b/tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v2-read.json similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/wallabag-v2-read.json rename to tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v2-read.json diff --git a/tests/Wallabag/ImportBundle/fixtures/wallabag-v2.json b/tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v2.json similarity index 100% rename from tests/Wallabag/ImportBundle/fixtures/wallabag-v2.json rename to tests/Wallabag/CoreBundle/fixtures/Import/wallabag-v2.json diff --git a/tests/Wallabag/ImportBundle/Import/ChromeImportTest.php b/tests/Wallabag/ImportBundle/Import/ChromeImportTest.php index 2585e10a3..f7e506124 100644 --- a/tests/Wallabag/ImportBundle/Import/ChromeImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/ChromeImportTest.php @@ -38,7 +38,7 @@ class ChromeImportTest extends TestCase public function testImport() { $chromeImport = $this->getChromeImport(false, 1); - $chromeImport->setFilepath(__DIR__ . '/../fixtures/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class ChromeImportTest extends TestCase public function testImportAndMarkAllAsRead() { $chromeImport = $this->getChromeImport(false, 1); - $chromeImport->setFilepath(__DIR__ . '/../fixtures/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -109,7 +109,7 @@ class ChromeImportTest extends TestCase public function testImportWithRabbit() { $chromeImport = $this->getChromeImport(); - $chromeImport->setFilepath(__DIR__ . '/../fixtures/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -149,7 +149,7 @@ class ChromeImportTest extends TestCase public function testImportWithRedis() { $chromeImport = $this->getChromeImport(); - $chromeImport->setFilepath(__DIR__ . '/../fixtures/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -189,7 +189,7 @@ class ChromeImportTest extends TestCase public function testImportBadFile() { $chromeImport = $this->getChromeImport(); - $chromeImport->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); + $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); $res = $chromeImport->import(); @@ -203,7 +203,7 @@ class ChromeImportTest extends TestCase public function testImportUserNotDefined() { $chromeImport = $this->getChromeImport(true); - $chromeImport->setFilepath(__DIR__ . '/../fixtures/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); $res = $chromeImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php b/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php index 0fbe537ae..cf890287e 100644 --- a/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php @@ -38,7 +38,7 @@ class FirefoxImportTest extends TestCase public function testImport() { $firefoxImport = $this->getFirefoxImport(false, 2); - $firefoxImport->setFilepath(__DIR__ . '/../fixtures/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class FirefoxImportTest extends TestCase public function testImportAndMarkAllAsRead() { $firefoxImport = $this->getFirefoxImport(false, 1); - $firefoxImport->setFilepath(__DIR__ . '/../fixtures/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -109,7 +109,7 @@ class FirefoxImportTest extends TestCase public function testImportWithRabbit() { $firefoxImport = $this->getFirefoxImport(); - $firefoxImport->setFilepath(__DIR__ . '/../fixtures/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -149,7 +149,7 @@ class FirefoxImportTest extends TestCase public function testImportWithRedis() { $firefoxImport = $this->getFirefoxImport(); - $firefoxImport->setFilepath(__DIR__ . '/../fixtures/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -189,7 +189,7 @@ class FirefoxImportTest extends TestCase public function testImportBadFile() { $firefoxImport = $this->getFirefoxImport(); - $firefoxImport->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); + $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); $res = $firefoxImport->import(); @@ -203,7 +203,7 @@ class FirefoxImportTest extends TestCase public function testImportUserNotDefined() { $firefoxImport = $this->getFirefoxImport(true); - $firefoxImport->setFilepath(__DIR__ . '/../fixtures/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); $res = $firefoxImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php b/tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php index ec67344a1..47201548f 100644 --- a/tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/InstapaperImportTest.php @@ -40,7 +40,7 @@ class InstapaperImportTest extends TestCase public function testImport() { $instapaperImport = $this->getInstapaperImport(false, 4); - $instapaperImport->setFilepath(__DIR__ . '/../fixtures/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -73,7 +73,7 @@ class InstapaperImportTest extends TestCase public function testImportAndMarkAllAsRead() { $instapaperImport = $this->getInstapaperImport(false, 1); - $instapaperImport->setFilepath(__DIR__ . '/../fixtures/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -111,7 +111,7 @@ class InstapaperImportTest extends TestCase public function testImportWithRabbit() { $instapaperImport = $this->getInstapaperImport(); - $instapaperImport->setFilepath(__DIR__ . '/../fixtures/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -151,7 +151,7 @@ class InstapaperImportTest extends TestCase public function testImportWithRedis() { $instapaperImport = $this->getInstapaperImport(); - $instapaperImport->setFilepath(__DIR__ . '/../fixtures/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -191,7 +191,7 @@ class InstapaperImportTest extends TestCase public function testImportBadFile() { $instapaperImport = $this->getInstapaperImport(); - $instapaperImport->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); + $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); $res = $instapaperImport->import(); @@ -205,7 +205,7 @@ class InstapaperImportTest extends TestCase public function testImportUserNotDefined() { $instapaperImport = $this->getInstapaperImport(true); - $instapaperImport->setFilepath(__DIR__ . '/../fixtures/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); $res = $instapaperImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php index 003a1961c..21ee84051 100644 --- a/tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php @@ -38,7 +38,7 @@ class PocketHtmlImportTest extends TestCase public function testImport() { $pocketHtmlImport = $this->getPocketHtmlImport(false, 2); - $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class PocketHtmlImportTest extends TestCase public function testImportAndMarkAllAsRead() { $pocketHtmlImport = $this->getPocketHtmlImport(false, 1); - $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -111,7 +111,7 @@ class PocketHtmlImportTest extends TestCase public function testImportWithRabbit() { $pocketHtmlImport = $this->getPocketHtmlImport(); - $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -151,7 +151,7 @@ class PocketHtmlImportTest extends TestCase public function testImportWithRedis() { $pocketHtmlImport = $this->getPocketHtmlImport(); - $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -191,7 +191,7 @@ class PocketHtmlImportTest extends TestCase public function testImportBadFile() { $pocketHtmlImport = $this->getPocketHtmlImport(); - $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); $res = $pocketHtmlImport->import(); @@ -205,7 +205,7 @@ class PocketHtmlImportTest extends TestCase public function testImportUserNotDefined() { $pocketHtmlImport = $this->getPocketHtmlImport(true); - $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); $res = $pocketHtmlImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php b/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php index a7f043291..30e7362ec 100644 --- a/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php @@ -38,7 +38,7 @@ class ReadabilityImportTest extends TestCase public function testImport() { $readabilityImport = $this->getReadabilityImport(false, 3); - $readabilityImport->setFilepath(__DIR__ . '/../fixtures/readability.json'); + $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class ReadabilityImportTest extends TestCase public function testImportAndMarkAllAsRead() { $readabilityImport = $this->getReadabilityImport(false, 1); - $readabilityImport->setFilepath(__DIR__ . '/../fixtures/readability-read.json'); + $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability-read.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -109,7 +109,7 @@ class ReadabilityImportTest extends TestCase public function testImportWithRabbit() { $readabilityImport = $this->getReadabilityImport(); - $readabilityImport->setFilepath(__DIR__ . '/../fixtures/readability.json'); + $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -149,7 +149,7 @@ class ReadabilityImportTest extends TestCase public function testImportWithRedis() { $readabilityImport = $this->getReadabilityImport(); - $readabilityImport->setFilepath(__DIR__ . '/../fixtures/readability.json'); + $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -189,7 +189,7 @@ class ReadabilityImportTest extends TestCase public function testImportBadFile() { $readabilityImport = $this->getReadabilityImport(); - $readabilityImport->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); + $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); $res = $readabilityImport->import(); @@ -203,7 +203,7 @@ class ReadabilityImportTest extends TestCase public function testImportUserNotDefined() { $readabilityImport = $this->getReadabilityImport(true); - $readabilityImport->setFilepath(__DIR__ . '/../fixtures/readability.json'); + $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json'); $res = $readabilityImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php b/tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php index 478916716..b961cea19 100644 --- a/tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php @@ -38,7 +38,7 @@ class ShaarliImportTest extends TestCase public function testImport() { $shaarliImport = $this->getShaarliImport(false, 2); - $shaarliImport->setFilepath(__DIR__ . '/../fixtures/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class ShaarliImportTest extends TestCase public function testImportAndMarkAllAsRead() { $shaarliImport = $this->getShaarliImport(false, 1); - $shaarliImport->setFilepath(__DIR__ . '/../fixtures/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -111,7 +111,7 @@ class ShaarliImportTest extends TestCase public function testImportWithRabbit() { $shaarliImport = $this->getShaarliImport(); - $shaarliImport->setFilepath(__DIR__ . '/../fixtures/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -151,7 +151,7 @@ class ShaarliImportTest extends TestCase public function testImportWithRedis() { $shaarliImport = $this->getShaarliImport(); - $shaarliImport->setFilepath(__DIR__ . '/../fixtures/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -191,7 +191,7 @@ class ShaarliImportTest extends TestCase public function testImportBadFile() { $shaarliImport = $this->getShaarliImport(); - $shaarliImport->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); + $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); $res = $shaarliImport->import(); @@ -205,7 +205,7 @@ class ShaarliImportTest extends TestCase public function testImportUserNotDefined() { $shaarliImport = $this->getShaarliImport(true); - $shaarliImport->setFilepath(__DIR__ . '/../fixtures/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); $res = $shaarliImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php b/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php index d248974e1..02e81ba5a 100644 --- a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php @@ -42,7 +42,7 @@ class WallabagV1ImportTest extends TestCase public function testImport() { $wallabagV1Import = $this->getWallabagV1Import(false, 1); - $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -75,7 +75,7 @@ class WallabagV1ImportTest extends TestCase public function testImportAndMarkAllAsRead() { $wallabagV1Import = $this->getWallabagV1Import(false, 3); - $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v1-read.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1-read.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -113,7 +113,7 @@ class WallabagV1ImportTest extends TestCase public function testImportWithRabbit() { $wallabagV1Import = $this->getWallabagV1Import(); - $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -153,7 +153,7 @@ class WallabagV1ImportTest extends TestCase public function testImportWithRedis() { $wallabagV1Import = $this->getWallabagV1Import(); - $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -193,7 +193,7 @@ class WallabagV1ImportTest extends TestCase public function testImportBadFile() { $wallabagV1Import = $this->getWallabagV1Import(); - $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.jsonx'); + $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); $res = $wallabagV1Import->import(); @@ -207,7 +207,7 @@ class WallabagV1ImportTest extends TestCase public function testImportUserNotDefined() { $wallabagV1Import = $this->getWallabagV1Import(true); - $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v1.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json'); $res = $wallabagV1Import->import(); diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php b/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php index 03cefa4d6..589416af0 100644 --- a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php +++ b/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php @@ -40,7 +40,7 @@ class WallabagV2ImportTest extends TestCase public function testImport() { $wallabagV2Import = $this->getWallabagV2Import(false, 2); - $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -69,7 +69,7 @@ class WallabagV2ImportTest extends TestCase public function testImportAndMarkAllAsRead() { $wallabagV2Import = $this->getWallabagV2Import(false, 2); - $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2-read.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2-read.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -107,7 +107,7 @@ class WallabagV2ImportTest extends TestCase public function testImportWithRabbit() { $wallabagV2Import = $this->getWallabagV2Import(); - $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -143,7 +143,7 @@ class WallabagV2ImportTest extends TestCase public function testImportWithRedis() { $wallabagV2Import = $this->getWallabagV2Import(); - $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -179,7 +179,7 @@ class WallabagV2ImportTest extends TestCase public function testImportBadFile() { $wallabagV1Import = $this->getWallabagV2Import(); - $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2.jsonx'); + $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.jsonx'); $res = $wallabagV1Import->import(); @@ -193,7 +193,7 @@ class WallabagV2ImportTest extends TestCase public function testImportUserNotDefined() { $wallabagV1Import = $this->getWallabagV2Import(true); - $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); $res = $wallabagV1Import->import(); @@ -207,7 +207,7 @@ class WallabagV2ImportTest extends TestCase public function testImportEmptyFile() { $wallabagV2Import = $this->getWallabagV2Import(); - $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2-empty.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2-empty.json'); $res = $wallabagV2Import->import(); @@ -218,7 +218,7 @@ class WallabagV2ImportTest extends TestCase public function testImportWithExceptionFromGraby() { $wallabagV2Import = $this->getWallabagV2Import(false, 2); - $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/wallabag-v2.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() From 47b3a08284f09c06addcbf6d010bc7c9609d4263 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sun, 31 Dec 2023 18:21:09 +0100 Subject: [PATCH 29/38] Move Import importers to Core --- app/config/services.yml | 24 +++++++++---------- app/config/services_rabbit.yml | 24 +++++++++---------- app/config/services_redis.yml | 24 +++++++++---------- phpstan-baseline.neon | 12 +++++----- .../Command/Import/ImportCommand.php | 22 ++++++++--------- .../CoreBundle/Consumer/AbstractConsumer.php | 2 +- .../Controller/Import/BrowserController.php | 2 +- .../Controller/Import/ChromeController.php | 2 +- .../Controller/Import/DeliciousController.php | 2 +- .../Controller/Import/ElcuratorController.php | 2 +- .../Controller/Import/FirefoxController.php | 2 +- .../Controller/Import/HtmlController.php | 2 +- .../Controller/Import/ImportController.php | 2 +- .../Import/InstapaperController.php | 2 +- .../Controller/Import/PinboardController.php | 2 +- .../Controller/Import/PocketController.php | 2 +- .../Import/PocketHtmlController.php | 2 +- .../Import/ReadabilityController.php | 2 +- .../Controller/Import/ShaarliController.php | 2 +- .../Controller/Import/WallabagController.php | 2 +- .../Import/WallabagV1Controller.php | 2 +- .../Import/WallabagV2Controller.php | 2 +- .../Import/AbstractImport.php | 2 +- .../Import/BrowserImport.php | 2 +- .../Import/ChromeImport.php | 2 +- .../Import/DeliciousImport.php | 2 +- .../Import/ElcuratorImport.php | 2 +- .../Import/FirefoxImport.php | 2 +- .../Import/HtmlImport.php | 2 +- .../Import/ImportChain.php | 2 +- .../Import/ImportCompilerPass.php | 2 +- .../Import/ImportInterface.php | 2 +- .../Import/InstapaperImport.php | 2 +- .../Import/PinboardImport.php | 2 +- .../Import/PocketHtmlImport.php | 2 +- .../Import/PocketImport.php | 2 +- .../Import/ReadabilityImport.php | 2 +- .../Import/ShaarliImport.php | 2 +- .../Import/WallabagImport.php | 2 +- .../Import/WallabagV1Import.php | 2 +- .../Import/WallabagV2Import.php | 2 +- .../ImportBundle/WallabagImportBundle.php | 2 +- .../Consumer/AMQPEntryConsumerTest.php | 2 +- .../Consumer/RedisEntryConsumerTest.php | 2 +- .../Import/PocketControllerTest.php | 2 +- .../Import/ChromeImportTest.php | 16 ++++++------- .../Import/FirefoxImportTest.php | 16 ++++++------- .../Import/ImportChainTest.php | 6 ++--- .../Import/ImportCompilerPassTest.php | 6 ++--- .../Import/InstapaperImportTest.php | 16 ++++++------- .../Import/PocketHtmlImportTest.php | 16 ++++++------- .../Import/PocketImportTest.php | 4 ++-- .../Import/ReadabilityImportTest.php | 16 ++++++------- .../Import/ShaarliImportTest.php | 16 ++++++------- .../Import/WallabagV1ImportTest.php | 16 ++++++------- .../Import/WallabagV2ImportTest.php | 20 ++++++++-------- 56 files changed, 167 insertions(+), 167 deletions(-) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/AbstractImport.php (99%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/BrowserImport.php (99%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/ChromeImport.php (96%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/DeliciousImport.php (98%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/ElcuratorImport.php (94%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/FirefoxImport.php (96%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/HtmlImport.php (99%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/ImportChain.php (92%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/ImportCompilerPass.php (95%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/ImportInterface.php (94%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/InstapaperImport.php (99%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/PinboardImport.php (98%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/PocketHtmlImport.php (98%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/PocketImport.php (99%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/ReadabilityImport.php (98%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/ShaarliImport.php (96%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/WallabagImport.php (98%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/WallabagV1Import.php (98%) rename src/Wallabag/{ImportBundle => CoreBundle}/Import/WallabagV2Import.php (95%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Import/ChromeImportTest.php (91%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Import/FirefoxImportTest.php (91%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Import/ImportChainTest.php (77%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Import/ImportCompilerPassTest.php (89%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Import/InstapaperImportTest.php (91%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Import/PocketHtmlImportTest.php (91%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Import/PocketImportTest.php (99%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Import/ReadabilityImportTest.php (91%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Import/ShaarliImportTest.php (91%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Import/WallabagV1ImportTest.php (92%) rename tests/Wallabag/{ImportBundle => CoreBundle}/Import/WallabagV2ImportTest.php (90%) diff --git a/app/config/services.yml b/app/config/services.yml index 6194edee8..142931330 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -329,53 +329,53 @@ services: wallabag_import.pocket.client: alias: 'httplug.client.wallabag_import.pocket.client' - Wallabag\ImportBundle\Import\PocketImport: + Wallabag\CoreBundle\Import\PocketImport: calls: - [ setClient, [ "@wallabag_import.pocket.client" ] ] tags: - { name: wallabag_import.import, alias: pocket } - Wallabag\ImportBundle\Import\WallabagV1Import: + Wallabag\CoreBundle\Import\WallabagV1Import: tags: - { name: wallabag_import.import, alias: wallabag_v1 } - Wallabag\ImportBundle\Import\WallabagV2Import: + Wallabag\CoreBundle\Import\WallabagV2Import: tags: - { name: wallabag_import.import, alias: wallabag_v2 } - Wallabag\ImportBundle\Import\ElcuratorImport: + Wallabag\CoreBundle\Import\ElcuratorImport: tags: - { name: wallabag_import.import, alias: elcurator } - Wallabag\ImportBundle\Import\ReadabilityImport: + Wallabag\CoreBundle\Import\ReadabilityImport: tags: - { name: wallabag_import.import, alias: readability } - Wallabag\ImportBundle\Import\InstapaperImport: + Wallabag\CoreBundle\Import\InstapaperImport: tags: - { name: wallabag_import.import, alias: instapaper } - Wallabag\ImportBundle\Import\PinboardImport: + Wallabag\CoreBundle\Import\PinboardImport: tags: - { name: wallabag_import.import, alias: pinboard } - Wallabag\ImportBundle\Import\DeliciousImport: + Wallabag\CoreBundle\Import\DeliciousImport: tags: - { name: wallabag_import.import, alias: delicious } - Wallabag\ImportBundle\Import\FirefoxImport: + Wallabag\CoreBundle\Import\FirefoxImport: tags: - { name: wallabag_import.import, alias: firefox } - Wallabag\ImportBundle\Import\ChromeImport: + Wallabag\CoreBundle\Import\ChromeImport: tags: - { name: wallabag_import.import, alias: chrome } - Wallabag\ImportBundle\Import\ShaarliImport: + Wallabag\CoreBundle\Import\ShaarliImport: tags: - { name: wallabag_import.import, alias: shaarli } - Wallabag\ImportBundle\Import\PocketHtmlImport: + Wallabag\CoreBundle\Import\PocketHtmlImport: tags: - { name: wallabag_import.import, alias: pocket_html } diff --git a/app/config/services_rabbit.yml b/app/config/services_rabbit.yml index ca59a22cd..b7ab0ccd4 100644 --- a/app/config/services_rabbit.yml +++ b/app/config/services_rabbit.yml @@ -23,59 +23,59 @@ services: wallabag_import.consumer.amqp.pocket: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\PocketImport' + $import: '@Wallabag\CoreBundle\Import\PocketImport' wallabag_import.consumer.amqp.readability: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ReadabilityImport' + $import: '@Wallabag\CoreBundle\Import\ReadabilityImport' wallabag_import.consumer.amqp.instapaper: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\InstapaperImport' + $import: '@Wallabag\CoreBundle\Import\InstapaperImport' wallabag_import.consumer.amqp.pinboard: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\PinboardImport' + $import: '@Wallabag\CoreBundle\Import\PinboardImport' wallabag_import.consumer.amqp.delicious: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\DeliciousImport' + $import: '@Wallabag\CoreBundle\Import\DeliciousImport' wallabag_import.consumer.amqp.wallabag_v1: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\WallabagV1Import' + $import: '@Wallabag\CoreBundle\Import\WallabagV1Import' wallabag_import.consumer.amqp.wallabag_v2: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\WallabagV2Import' + $import: '@Wallabag\CoreBundle\Import\WallabagV2Import' wallabag_import.consumer.amqp.elcurator: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ElcuratorImport' + $import: '@Wallabag\CoreBundle\Import\ElcuratorImport' wallabag_import.consumer.amqp.firefox: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\FirefoxImport' + $import: '@Wallabag\CoreBundle\Import\FirefoxImport' wallabag_import.consumer.amqp.chrome: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ChromeImport' + $import: '@Wallabag\CoreBundle\Import\ChromeImport' wallabag_import.consumer.amqp.shaarli: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ShaarliImport' + $import: '@Wallabag\CoreBundle\Import\ShaarliImport' wallabag_import.consumer.amqp.pocket_html: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\PocketHtmlImport' + $import: '@Wallabag\CoreBundle\Import\PocketHtmlImport' diff --git a/app/config/services_redis.yml b/app/config/services_redis.yml index 51c5194dd..cee479999 100644 --- a/app/config/services_redis.yml +++ b/app/config/services_redis.yml @@ -19,7 +19,7 @@ services: wallabag_import.consumer.redis.readability: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ReadabilityImport' + $import: '@Wallabag\CoreBundle\Import\ReadabilityImport' # instapaper wallabag_import.queue.redis.instapaper: @@ -35,7 +35,7 @@ services: wallabag_import.consumer.redis.instapaper: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\InstapaperImport' + $import: '@Wallabag\CoreBundle\Import\InstapaperImport' # pinboard wallabag_import.queue.redis.pinboard: @@ -51,7 +51,7 @@ services: wallabag_import.consumer.redis.pinboard: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\PinboardImport' + $import: '@Wallabag\CoreBundle\Import\PinboardImport' # delicious wallabag_import.queue.redis.delicious: @@ -67,7 +67,7 @@ services: wallabag_import.consumer.redis.delicious: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\DeliciousImport' + $import: '@Wallabag\CoreBundle\Import\DeliciousImport' # pocket wallabag_import.queue.redis.pocket: @@ -83,7 +83,7 @@ services: wallabag_import.consumer.redis.pocket: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\PocketImport' + $import: '@Wallabag\CoreBundle\Import\PocketImport' # wallabag v1 wallabag_import.queue.redis.wallabag_v1: @@ -99,7 +99,7 @@ services: wallabag_import.consumer.redis.wallabag_v1: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\WallabagV1Import' + $import: '@Wallabag\CoreBundle\Import\WallabagV1Import' # wallabag v2 wallabag_import.queue.redis.wallabag_v2: @@ -115,7 +115,7 @@ services: wallabag_import.consumer.redis.wallabag_v2: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\WallabagV2Import' + $import: '@Wallabag\CoreBundle\Import\WallabagV2Import' # elcurator wallabag_import.queue.redis.elcurator: @@ -131,7 +131,7 @@ services: wallabag_import.consumer.redis.elcurator: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ElcuratorImport' + $import: '@Wallabag\CoreBundle\Import\ElcuratorImport' # firefox wallabag_import.queue.redis.firefox: @@ -147,7 +147,7 @@ services: wallabag_import.consumer.redis.firefox: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\FirefoxImport' + $import: '@Wallabag\CoreBundle\Import\FirefoxImport' # chrome wallabag_import.queue.redis.chrome: @@ -163,7 +163,7 @@ services: wallabag_import.consumer.redis.chrome: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ChromeImport' + $import: '@Wallabag\CoreBundle\Import\ChromeImport' # shaarli wallabag_import.queue.redis.shaarli: @@ -179,7 +179,7 @@ services: wallabag_import.consumer.redis.shaarli: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\ShaarliImport' + $import: '@Wallabag\CoreBundle\Import\ShaarliImport' # pocket html wallabag_import.queue.redis.pocket_html: @@ -195,4 +195,4 @@ services: wallabag_import.consumer.redis.pocket_html: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: - $import: '@Wallabag\ImportBundle\Import\PocketHtmlImport' + $import: '@Wallabag\CoreBundle\Import\PocketHtmlImport' diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index dab2030fe..9ebbc1c5f 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -21,32 +21,32 @@ parameters: path: src/Wallabag/CoreBundle/Controller/ConfigController.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" + message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/Import/BrowserController.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" + message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/Import/BrowserController.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" + message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/Import/HtmlController.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" + message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/Import/HtmlController.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" + message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/Import/WallabagController.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" + message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Import\\\\ImportInterface\\:\\:setUser\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/Import/WallabagController.php diff --git a/src/Wallabag/CoreBundle/Command/Import/ImportCommand.php b/src/Wallabag/CoreBundle/Command/Import/ImportCommand.php index 78cead733..f55c8c97f 100644 --- a/src/Wallabag/CoreBundle/Command/Import/ImportCommand.php +++ b/src/Wallabag/CoreBundle/Command/Import/ImportCommand.php @@ -14,18 +14,18 @@ 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\CoreBundle\Import\ChromeImport; +use Wallabag\CoreBundle\Import\DeliciousImport; +use Wallabag\CoreBundle\Import\ElcuratorImport; +use Wallabag\CoreBundle\Import\FirefoxImport; +use Wallabag\CoreBundle\Import\InstapaperImport; +use Wallabag\CoreBundle\Import\PinboardImport; +use Wallabag\CoreBundle\Import\PocketHtmlImport; +use Wallabag\CoreBundle\Import\ReadabilityImport; +use Wallabag\CoreBundle\Import\ShaarliImport; +use Wallabag\CoreBundle\Import\WallabagV1Import; +use Wallabag\CoreBundle\Import\WallabagV2Import; use Wallabag\CoreBundle\Repository\UserRepository; -use Wallabag\ImportBundle\Import\ChromeImport; -use Wallabag\ImportBundle\Import\DeliciousImport; -use Wallabag\ImportBundle\Import\ElcuratorImport; -use Wallabag\ImportBundle\Import\FirefoxImport; -use Wallabag\ImportBundle\Import\InstapaperImport; -use Wallabag\ImportBundle\Import\PinboardImport; -use Wallabag\ImportBundle\Import\PocketHtmlImport; -use Wallabag\ImportBundle\Import\ReadabilityImport; -use Wallabag\ImportBundle\Import\ShaarliImport; -use Wallabag\ImportBundle\Import\WallabagV1Import; -use Wallabag\ImportBundle\Import\WallabagV2Import; class ImportCommand extends Command { diff --git a/src/Wallabag/CoreBundle/Consumer/AbstractConsumer.php b/src/Wallabag/CoreBundle/Consumer/AbstractConsumer.php index 242b94a69..cc4134201 100644 --- a/src/Wallabag/CoreBundle/Consumer/AbstractConsumer.php +++ b/src/Wallabag/CoreBundle/Consumer/AbstractConsumer.php @@ -9,8 +9,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Tag; use Wallabag\CoreBundle\Event\EntrySavedEvent; +use Wallabag\CoreBundle\Import\AbstractImport; use Wallabag\CoreBundle\Repository\UserRepository; -use Wallabag\ImportBundle\Import\AbstractImport; abstract class AbstractConsumer { diff --git a/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php b/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php index 0288e1243..74b3131f0 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php @@ -7,8 +7,8 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\ImportInterface; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\ImportInterface; abstract class BrowserController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php b/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php index afced108d..6f0ede269 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\ChromeImport; +use Wallabag\CoreBundle\Import\ChromeImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class ChromeController extends BrowserController diff --git a/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php b/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php index 27dc380df..b4ae46ec7 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php @@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\DeliciousImport; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\DeliciousImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class DeliciousController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php b/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php index 068a2db2b..033805660 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\ElcuratorImport; +use Wallabag\CoreBundle\Import\ElcuratorImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class ElcuratorController extends WallabagController diff --git a/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php b/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php index 497ff26a6..2d17d5f62 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\FirefoxImport; +use Wallabag\CoreBundle\Import\FirefoxImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class FirefoxController extends BrowserController diff --git a/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php b/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php index 258ac1dfa..5a0548afe 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php @@ -7,8 +7,8 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\ImportInterface; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\ImportInterface; abstract class HtmlController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/ImportController.php b/src/Wallabag/CoreBundle/Controller/Import/ImportController.php index ff72eddf5..ce60989fb 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ImportController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ImportController.php @@ -8,7 +8,7 @@ use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Wallabag\CoreBundle\Consumer\RabbitMQConsumerTotalProxy; use Wallabag\CoreBundle\Controller\AbstractController; -use Wallabag\ImportBundle\Import\ImportChain; +use Wallabag\CoreBundle\Import\ImportChain; class ImportController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php b/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php index 904be04e1..04631e93f 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php @@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\InstapaperImport; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\InstapaperImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class InstapaperController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php b/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php index 152db6269..252e7410a 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php @@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\PinboardImport; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\PinboardImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class PinboardController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/PocketController.php b/src/Wallabag/CoreBundle/Controller/Import/PocketController.php index abc486ff1..ef510cd4f 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PocketController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PocketController.php @@ -11,7 +11,7 @@ use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; -use Wallabag\ImportBundle\Import\PocketImport; +use Wallabag\CoreBundle\Import\PocketImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class PocketController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php b/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php index af022f5c3..c2de4398b 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\PocketHtmlImport; +use Wallabag\CoreBundle\Import\PocketHtmlImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class PocketHtmlController extends HtmlController diff --git a/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php b/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php index fa05b07b3..8e26ff315 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php @@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\ReadabilityImport; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\ReadabilityImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class ReadabilityController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php b/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php index a93c9db68..eef4e19ec 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\ShaarliImport; +use Wallabag\CoreBundle\Import\ShaarliImport; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class ShaarliController extends HtmlController diff --git a/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php b/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php index db0426e27..440df2005 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php @@ -7,8 +7,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Import\ImportInterface; use Wallabag\ImportBundle\Form\Type\UploadImportType; -use Wallabag\ImportBundle\Import\ImportInterface; /** * Define Wallabag import for v1 and v2, since there are very similar. diff --git a/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php b/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php index 337b58f16..c4a3bacd6 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php +++ b/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\WallabagV1Import; +use Wallabag\CoreBundle\Import\WallabagV1Import; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class WallabagV1Controller extends WallabagController diff --git a/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php b/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php index 645cee790..f5ea6e746 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php +++ b/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php @@ -7,7 +7,7 @@ use OldSound\RabbitMqBundle\RabbitMq\Producer as RabbitMqProducer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; -use Wallabag\ImportBundle\Import\WallabagV2Import; +use Wallabag\CoreBundle\Import\WallabagV2Import; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class WallabagV2Controller extends WallabagController diff --git a/src/Wallabag/ImportBundle/Import/AbstractImport.php b/src/Wallabag/CoreBundle/Import/AbstractImport.php similarity index 99% rename from src/Wallabag/ImportBundle/Import/AbstractImport.php rename to src/Wallabag/CoreBundle/Import/AbstractImport.php index c9a47562c..203370192 100644 --- a/src/Wallabag/ImportBundle/Import/AbstractImport.php +++ b/src/Wallabag/CoreBundle/Import/AbstractImport.php @@ -1,6 +1,6 @@ getChromeImport(false, 1); - $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../fixtures/Import/chrome-bookmarks'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class ChromeImportTest extends TestCase public function testImportAndMarkAllAsRead() { $chromeImport = $this->getChromeImport(false, 1); - $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../fixtures/Import/chrome-bookmarks'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -109,7 +109,7 @@ class ChromeImportTest extends TestCase public function testImportWithRabbit() { $chromeImport = $this->getChromeImport(); - $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../fixtures/Import/chrome-bookmarks'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -149,7 +149,7 @@ class ChromeImportTest extends TestCase public function testImportWithRedis() { $chromeImport = $this->getChromeImport(); - $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../fixtures/Import/chrome-bookmarks'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -189,7 +189,7 @@ class ChromeImportTest extends TestCase public function testImportBadFile() { $chromeImport = $this->getChromeImport(); - $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $chromeImport->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $chromeImport->import(); @@ -203,7 +203,7 @@ class ChromeImportTest extends TestCase public function testImportUserNotDefined() { $chromeImport = $this->getChromeImport(true); - $chromeImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/chrome-bookmarks'); + $chromeImport->setFilepath(__DIR__ . '/../fixtures/Import/chrome-bookmarks'); $res = $chromeImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php b/tests/Wallabag/CoreBundle/Import/FirefoxImportTest.php similarity index 91% rename from tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php rename to tests/Wallabag/CoreBundle/Import/FirefoxImportTest.php index cf890287e..5dcdb059a 100644 --- a/tests/Wallabag/ImportBundle/Import/FirefoxImportTest.php +++ b/tests/Wallabag/CoreBundle/Import/FirefoxImportTest.php @@ -1,6 +1,6 @@ getFirefoxImport(false, 2); - $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../fixtures/Import/firefox-bookmarks.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class FirefoxImportTest extends TestCase public function testImportAndMarkAllAsRead() { $firefoxImport = $this->getFirefoxImport(false, 1); - $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../fixtures/Import/firefox-bookmarks.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -109,7 +109,7 @@ class FirefoxImportTest extends TestCase public function testImportWithRabbit() { $firefoxImport = $this->getFirefoxImport(); - $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../fixtures/Import/firefox-bookmarks.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -149,7 +149,7 @@ class FirefoxImportTest extends TestCase public function testImportWithRedis() { $firefoxImport = $this->getFirefoxImport(); - $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../fixtures/Import/firefox-bookmarks.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -189,7 +189,7 @@ class FirefoxImportTest extends TestCase public function testImportBadFile() { $firefoxImport = $this->getFirefoxImport(); - $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $firefoxImport->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $firefoxImport->import(); @@ -203,7 +203,7 @@ class FirefoxImportTest extends TestCase public function testImportUserNotDefined() { $firefoxImport = $this->getFirefoxImport(true); - $firefoxImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/firefox-bookmarks.json'); + $firefoxImport->setFilepath(__DIR__ . '/../fixtures/Import/firefox-bookmarks.json'); $res = $firefoxImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/ImportChainTest.php b/tests/Wallabag/CoreBundle/Import/ImportChainTest.php similarity index 77% rename from tests/Wallabag/ImportBundle/Import/ImportChainTest.php rename to tests/Wallabag/CoreBundle/Import/ImportChainTest.php index c3984fa63..424b84b64 100644 --- a/tests/Wallabag/ImportBundle/Import/ImportChainTest.php +++ b/tests/Wallabag/CoreBundle/Import/ImportChainTest.php @@ -1,10 +1,10 @@ getInstapaperImport(false, 4); - $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../fixtures/Import/instapaper-export.csv'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -73,7 +73,7 @@ class InstapaperImportTest extends TestCase public function testImportAndMarkAllAsRead() { $instapaperImport = $this->getInstapaperImport(false, 1); - $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../fixtures/Import/instapaper-export.csv'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -111,7 +111,7 @@ class InstapaperImportTest extends TestCase public function testImportWithRabbit() { $instapaperImport = $this->getInstapaperImport(); - $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../fixtures/Import/instapaper-export.csv'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -151,7 +151,7 @@ class InstapaperImportTest extends TestCase public function testImportWithRedis() { $instapaperImport = $this->getInstapaperImport(); - $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../fixtures/Import/instapaper-export.csv'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -191,7 +191,7 @@ class InstapaperImportTest extends TestCase public function testImportBadFile() { $instapaperImport = $this->getInstapaperImport(); - $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $instapaperImport->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $instapaperImport->import(); @@ -205,7 +205,7 @@ class InstapaperImportTest extends TestCase public function testImportUserNotDefined() { $instapaperImport = $this->getInstapaperImport(true); - $instapaperImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/instapaper-export.csv'); + $instapaperImport->setFilepath(__DIR__ . '/../fixtures/Import/instapaper-export.csv'); $res = $instapaperImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php b/tests/Wallabag/CoreBundle/Import/PocketHtmlImportTest.php similarity index 91% rename from tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php rename to tests/Wallabag/CoreBundle/Import/PocketHtmlImportTest.php index 21ee84051..af7f27adb 100644 --- a/tests/Wallabag/ImportBundle/Import/PocketHtmlImportTest.php +++ b/tests/Wallabag/CoreBundle/Import/PocketHtmlImportTest.php @@ -1,6 +1,6 @@ getPocketHtmlImport(false, 2); - $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/Import/ril_export.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class PocketHtmlImportTest extends TestCase public function testImportAndMarkAllAsRead() { $pocketHtmlImport = $this->getPocketHtmlImport(false, 1); - $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/Import/ril_export.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -111,7 +111,7 @@ class PocketHtmlImportTest extends TestCase public function testImportWithRabbit() { $pocketHtmlImport = $this->getPocketHtmlImport(); - $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/Import/ril_export.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -151,7 +151,7 @@ class PocketHtmlImportTest extends TestCase public function testImportWithRedis() { $pocketHtmlImport = $this->getPocketHtmlImport(); - $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/Import/ril_export.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -191,7 +191,7 @@ class PocketHtmlImportTest extends TestCase public function testImportBadFile() { $pocketHtmlImport = $this->getPocketHtmlImport(); - $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $pocketHtmlImport->import(); @@ -205,7 +205,7 @@ class PocketHtmlImportTest extends TestCase public function testImportUserNotDefined() { $pocketHtmlImport = $this->getPocketHtmlImport(true); - $pocketHtmlImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/ril_export.html'); + $pocketHtmlImport->setFilepath(__DIR__ . '/../fixtures/Import/ril_export.html'); $res = $pocketHtmlImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/CoreBundle/Import/PocketImportTest.php similarity index 99% rename from tests/Wallabag/ImportBundle/Import/PocketImportTest.php rename to tests/Wallabag/CoreBundle/Import/PocketImportTest.php index 04858f476..04758762b 100644 --- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php +++ b/tests/Wallabag/CoreBundle/Import/PocketImportTest.php @@ -1,6 +1,6 @@ getReadabilityImport(false, 3); - $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json'); + $readabilityImport->setFilepath(__DIR__ . '/../fixtures/Import/readability.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class ReadabilityImportTest extends TestCase public function testImportAndMarkAllAsRead() { $readabilityImport = $this->getReadabilityImport(false, 1); - $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability-read.json'); + $readabilityImport->setFilepath(__DIR__ . '/../fixtures/Import/readability-read.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -109,7 +109,7 @@ class ReadabilityImportTest extends TestCase public function testImportWithRabbit() { $readabilityImport = $this->getReadabilityImport(); - $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json'); + $readabilityImport->setFilepath(__DIR__ . '/../fixtures/Import/readability.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -149,7 +149,7 @@ class ReadabilityImportTest extends TestCase public function testImportWithRedis() { $readabilityImport = $this->getReadabilityImport(); - $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json'); + $readabilityImport->setFilepath(__DIR__ . '/../fixtures/Import/readability.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -189,7 +189,7 @@ class ReadabilityImportTest extends TestCase public function testImportBadFile() { $readabilityImport = $this->getReadabilityImport(); - $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $readabilityImport->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $readabilityImport->import(); @@ -203,7 +203,7 @@ class ReadabilityImportTest extends TestCase public function testImportUserNotDefined() { $readabilityImport = $this->getReadabilityImport(true); - $readabilityImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/readability.json'); + $readabilityImport->setFilepath(__DIR__ . '/../fixtures/Import/readability.json'); $res = $readabilityImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php b/tests/Wallabag/CoreBundle/Import/ShaarliImportTest.php similarity index 91% rename from tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php rename to tests/Wallabag/CoreBundle/Import/ShaarliImportTest.php index b961cea19..a3e9d8887 100644 --- a/tests/Wallabag/ImportBundle/Import/ShaarliImportTest.php +++ b/tests/Wallabag/CoreBundle/Import/ShaarliImportTest.php @@ -1,6 +1,6 @@ getShaarliImport(false, 2); - $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../fixtures/Import/shaarli-bookmarks.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -71,7 +71,7 @@ class ShaarliImportTest extends TestCase public function testImportAndMarkAllAsRead() { $shaarliImport = $this->getShaarliImport(false, 1); - $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../fixtures/Import/shaarli-bookmarks.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -111,7 +111,7 @@ class ShaarliImportTest extends TestCase public function testImportWithRabbit() { $shaarliImport = $this->getShaarliImport(); - $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../fixtures/Import/shaarli-bookmarks.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -151,7 +151,7 @@ class ShaarliImportTest extends TestCase public function testImportWithRedis() { $shaarliImport = $this->getShaarliImport(); - $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../fixtures/Import/shaarli-bookmarks.html'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -191,7 +191,7 @@ class ShaarliImportTest extends TestCase public function testImportBadFile() { $shaarliImport = $this->getShaarliImport(); - $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $shaarliImport->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $shaarliImport->import(); @@ -205,7 +205,7 @@ class ShaarliImportTest extends TestCase public function testImportUserNotDefined() { $shaarliImport = $this->getShaarliImport(true); - $shaarliImport->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/shaarli-bookmarks.html'); + $shaarliImport->setFilepath(__DIR__ . '/../fixtures/Import/shaarli-bookmarks.html'); $res = $shaarliImport->import(); diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php b/tests/Wallabag/CoreBundle/Import/WallabagV1ImportTest.php similarity index 92% rename from tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php rename to tests/Wallabag/CoreBundle/Import/WallabagV1ImportTest.php index 02e81ba5a..68aa3a88b 100644 --- a/tests/Wallabag/ImportBundle/Import/WallabagV1ImportTest.php +++ b/tests/Wallabag/CoreBundle/Import/WallabagV1ImportTest.php @@ -1,6 +1,6 @@ getWallabagV1Import(false, 1); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -75,7 +75,7 @@ class WallabagV1ImportTest extends TestCase public function testImportAndMarkAllAsRead() { $wallabagV1Import = $this->getWallabagV1Import(false, 3); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1-read.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1-read.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -113,7 +113,7 @@ class WallabagV1ImportTest extends TestCase public function testImportWithRabbit() { $wallabagV1Import = $this->getWallabagV1Import(); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -153,7 +153,7 @@ class WallabagV1ImportTest extends TestCase public function testImportWithRedis() { $wallabagV1Import = $this->getWallabagV1Import(); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -193,7 +193,7 @@ class WallabagV1ImportTest extends TestCase public function testImportBadFile() { $wallabagV1Import = $this->getWallabagV1Import(); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.jsonx'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.jsonx'); $res = $wallabagV1Import->import(); @@ -207,7 +207,7 @@ class WallabagV1ImportTest extends TestCase public function testImportUserNotDefined() { $wallabagV1Import = $this->getWallabagV1Import(true); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v1.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v1.json'); $res = $wallabagV1Import->import(); diff --git a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php b/tests/Wallabag/CoreBundle/Import/WallabagV2ImportTest.php similarity index 90% rename from tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php rename to tests/Wallabag/CoreBundle/Import/WallabagV2ImportTest.php index 589416af0..4f535b2dd 100644 --- a/tests/Wallabag/ImportBundle/Import/WallabagV2ImportTest.php +++ b/tests/Wallabag/CoreBundle/Import/WallabagV2ImportTest.php @@ -1,6 +1,6 @@ getWallabagV2Import(false, 2); - $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -69,7 +69,7 @@ class WallabagV2ImportTest extends TestCase public function testImportAndMarkAllAsRead() { $wallabagV2Import = $this->getWallabagV2Import(false, 2); - $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2-read.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2-read.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -107,7 +107,7 @@ class WallabagV2ImportTest extends TestCase public function testImportWithRabbit() { $wallabagV2Import = $this->getWallabagV2Import(); - $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -143,7 +143,7 @@ class WallabagV2ImportTest extends TestCase public function testImportWithRedis() { $wallabagV2Import = $this->getWallabagV2Import(); - $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() @@ -179,7 +179,7 @@ class WallabagV2ImportTest extends TestCase public function testImportBadFile() { $wallabagV1Import = $this->getWallabagV2Import(); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.jsonx'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2.jsonx'); $res = $wallabagV1Import->import(); @@ -193,7 +193,7 @@ class WallabagV2ImportTest extends TestCase public function testImportUserNotDefined() { $wallabagV1Import = $this->getWallabagV2Import(true); - $wallabagV1Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); + $wallabagV1Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2.json'); $res = $wallabagV1Import->import(); @@ -207,7 +207,7 @@ class WallabagV2ImportTest extends TestCase public function testImportEmptyFile() { $wallabagV2Import = $this->getWallabagV2Import(); - $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2-empty.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2-empty.json'); $res = $wallabagV2Import->import(); @@ -218,7 +218,7 @@ class WallabagV2ImportTest extends TestCase public function testImportWithExceptionFromGraby() { $wallabagV2Import = $this->getWallabagV2Import(false, 2); - $wallabagV2Import->setFilepath(__DIR__ . '/../../CoreBundle/fixtures/Import/wallabag-v2.json'); + $wallabagV2Import->setFilepath(__DIR__ . '/../fixtures/Import/wallabag-v2.json'); $entryRepo = $this->getMockBuilder(EntryRepository::class) ->disableOriginalConstructor() From 48a6948abc16a786d394a8fdfcfc211aceafe5ea Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sun, 31 Dec 2023 18:40:02 +0100 Subject: [PATCH 30/38] Move Import form type to Core --- src/Wallabag/CoreBundle/Controller/Import/BrowserController.php | 2 +- .../CoreBundle/Controller/Import/DeliciousController.php | 2 +- src/Wallabag/CoreBundle/Controller/Import/HtmlController.php | 2 +- .../CoreBundle/Controller/Import/InstapaperController.php | 2 +- .../CoreBundle/Controller/Import/PinboardController.php | 2 +- .../CoreBundle/Controller/Import/ReadabilityController.php | 2 +- .../CoreBundle/Controller/Import/WallabagController.php | 2 +- .../{ImportBundle => CoreBundle}/Form/Type/UploadImportType.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) rename src/Wallabag/{ImportBundle => CoreBundle}/Form/Type/UploadImportType.php (95%) diff --git a/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php b/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php index 74b3131f0..c89df2e11 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php @@ -7,8 +7,8 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Form\Type\UploadImportType; use Wallabag\CoreBundle\Import\ImportInterface; -use Wallabag\ImportBundle\Form\Type\UploadImportType; abstract class BrowserController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php b/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php index b4ae46ec7..9b11d1fea 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php @@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Form\Type\UploadImportType; use Wallabag\CoreBundle\Import\DeliciousImport; -use Wallabag\ImportBundle\Form\Type\UploadImportType; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class DeliciousController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php b/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php index 5a0548afe..e6f0af226 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php @@ -7,8 +7,8 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Form\Type\UploadImportType; use Wallabag\CoreBundle\Import\ImportInterface; -use Wallabag\ImportBundle\Form\Type\UploadImportType; abstract class HtmlController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php b/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php index 04631e93f..13ef18084 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php @@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Form\Type\UploadImportType; use Wallabag\CoreBundle\Import\InstapaperImport; -use Wallabag\ImportBundle\Form\Type\UploadImportType; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class InstapaperController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php b/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php index 252e7410a..5d101604d 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php @@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Form\Type\UploadImportType; use Wallabag\CoreBundle\Import\PinboardImport; -use Wallabag\ImportBundle\Form\Type\UploadImportType; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class PinboardController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php b/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php index 8e26ff315..5fc3138eb 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php @@ -8,8 +8,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Form\Type\UploadImportType; use Wallabag\CoreBundle\Import\ReadabilityImport; -use Wallabag\ImportBundle\Form\Type\UploadImportType; use Wallabag\ImportBundle\Redis\Producer as RedisProducer; class ReadabilityController extends AbstractController diff --git a/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php b/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php index 440df2005..bdc830ba7 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php @@ -7,8 +7,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; +use Wallabag\CoreBundle\Form\Type\UploadImportType; use Wallabag\CoreBundle\Import\ImportInterface; -use Wallabag\ImportBundle\Form\Type\UploadImportType; /** * Define Wallabag import for v1 and v2, since there are very similar. diff --git a/src/Wallabag/ImportBundle/Form/Type/UploadImportType.php b/src/Wallabag/CoreBundle/Form/Type/UploadImportType.php similarity index 95% rename from src/Wallabag/ImportBundle/Form/Type/UploadImportType.php rename to src/Wallabag/CoreBundle/Form/Type/UploadImportType.php index c50ef8c91..db32544ef 100644 --- a/src/Wallabag/ImportBundle/Form/Type/UploadImportType.php +++ b/src/Wallabag/CoreBundle/Form/Type/UploadImportType.php @@ -1,6 +1,6 @@ Date: Sun, 31 Dec 2023 21:13:25 +0100 Subject: [PATCH 31/38] Move Import redis to Core --- app/config/services.yml | 6 +---- app/config/services_redis.yml | 24 +++++++++---------- .../Controller/Import/ChromeController.php | 2 +- .../Controller/Import/DeliciousController.php | 2 +- .../Controller/Import/ElcuratorController.php | 2 +- .../Controller/Import/FirefoxController.php | 2 +- .../Import/InstapaperController.php | 2 +- .../Controller/Import/PinboardController.php | 2 +- .../Controller/Import/PocketController.php | 2 +- .../Import/PocketHtmlController.php | 2 +- .../Import/ReadabilityController.php | 2 +- .../Controller/Import/ShaarliController.php | 2 +- .../Import/WallabagV1Controller.php | 2 +- .../Import/WallabagV2Controller.php | 2 +- .../Redis/Producer.php | 2 +- .../CoreBundle/Import/ChromeImportTest.php | 2 +- .../CoreBundle/Import/FirefoxImportTest.php | 2 +- .../Import/InstapaperImportTest.php | 2 +- .../Import/PocketHtmlImportTest.php | 2 +- .../CoreBundle/Import/PocketImportTest.php | 2 +- .../Import/ReadabilityImportTest.php | 2 +- .../CoreBundle/Import/ShaarliImportTest.php | 2 +- .../Import/WallabagV1ImportTest.php | 2 +- .../Import/WallabagV2ImportTest.php | 2 +- 24 files changed, 35 insertions(+), 39 deletions(-) rename src/Wallabag/{ImportBundle => CoreBundle}/Redis/Producer.php (96%) diff --git a/app/config/services.yml b/app/config/services.yml index 142931330..de4a5f696 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -34,7 +34,7 @@ services: Wallabag\CoreBundle\: resource: '../../src/Wallabag/CoreBundle/*' - exclude: ['../../src/Wallabag/CoreBundle/{Consumer,Controller,Entity,DataFixtures}', '../../src/Wallabag/CoreBundle/Event/*Event.php'] + exclude: ['../../src/Wallabag/CoreBundle/{Consumer,Controller,Entity,DataFixtures,Redis}', '../../src/Wallabag/CoreBundle/Event/*Event.php'] # controllers are imported separately to make sure services can be injected # as action arguments even if you don't extend any base controller class @@ -103,10 +103,6 @@ services: $rabbitMqProducer: '@old_sound_rabbit_mq.import_pocket_html_producer' $redisProducer: '@wallabag_import.producer.redis.pocket_html' - Wallabag\ImportBundle\: - resource: '../../src/Wallabag/ImportBundle/*' - exclude: '../../src/Wallabag/ImportBundle/{Consumer,Controller,Redis}' - Doctrine\DBAL\Connection: alias: doctrine.dbal.default_connection diff --git a/app/config/services_redis.yml b/app/config/services_redis.yml index cee479999..11fc0dac3 100644 --- a/app/config/services_redis.yml +++ b/app/config/services_redis.yml @@ -12,7 +12,7 @@ services: $queueName: "wallabag.import.readability" wallabag_import.producer.redis.readability: - class: Wallabag\ImportBundle\Redis\Producer + class: Wallabag\CoreBundle\Redis\Producer arguments: - "@wallabag_import.queue.redis.readability" @@ -28,7 +28,7 @@ services: $queueName: "wallabag.import.instapaper" wallabag_import.producer.redis.instapaper: - class: Wallabag\ImportBundle\Redis\Producer + class: Wallabag\CoreBundle\Redis\Producer arguments: - "@wallabag_import.queue.redis.instapaper" @@ -44,7 +44,7 @@ services: $queueName: "wallabag.import.pinboard" wallabag_import.producer.redis.pinboard: - class: Wallabag\ImportBundle\Redis\Producer + class: Wallabag\CoreBundle\Redis\Producer arguments: - "@wallabag_import.queue.redis.pinboard" @@ -60,7 +60,7 @@ services: $queueName: "wallabag.import.delicious" wallabag_import.producer.redis.delicious: - class: Wallabag\ImportBundle\Redis\Producer + class: Wallabag\CoreBundle\Redis\Producer arguments: - "@wallabag_import.queue.redis.delicious" @@ -76,7 +76,7 @@ services: $queueName: "wallabag.import.pocket" wallabag_import.producer.redis.pocket: - class: Wallabag\ImportBundle\Redis\Producer + class: Wallabag\CoreBundle\Redis\Producer arguments: - "@wallabag_import.queue.redis.pocket" @@ -92,7 +92,7 @@ services: $queueName: "wallabag.import.wallabag_v1" wallabag_import.producer.redis.wallabag_v1: - class: Wallabag\ImportBundle\Redis\Producer + class: Wallabag\CoreBundle\Redis\Producer arguments: - "@wallabag_import.queue.redis.wallabag_v1" @@ -108,7 +108,7 @@ services: $queueName: "wallabag.import.wallabag_v2" wallabag_import.producer.redis.wallabag_v2: - class: Wallabag\ImportBundle\Redis\Producer + class: Wallabag\CoreBundle\Redis\Producer arguments: - "@wallabag_import.queue.redis.wallabag_v2" @@ -124,7 +124,7 @@ services: $queueName: "wallabag.import.elcurator" wallabag_import.producer.redis.elcurator: - class: Wallabag\ImportBundle\Redis\Producer + class: Wallabag\CoreBundle\Redis\Producer arguments: - "@wallabag_import.queue.redis.elcurator" @@ -140,7 +140,7 @@ services: $queueName: "wallabag.import.firefox" wallabag_import.producer.redis.firefox: - class: Wallabag\ImportBundle\Redis\Producer + class: Wallabag\CoreBundle\Redis\Producer arguments: - "@wallabag_import.queue.redis.firefox" @@ -156,7 +156,7 @@ services: $queueName: "wallabag.import.chrome" wallabag_import.producer.redis.chrome: - class: Wallabag\ImportBundle\Redis\Producer + class: Wallabag\CoreBundle\Redis\Producer arguments: - "@wallabag_import.queue.redis.chrome" @@ -172,7 +172,7 @@ services: $queueName: "wallabag.import.shaarli" wallabag_import.producer.redis.shaarli: - class: Wallabag\ImportBundle\Redis\Producer + class: Wallabag\CoreBundle\Redis\Producer arguments: - "@wallabag_import.queue.redis.shaarli" @@ -188,7 +188,7 @@ services: $queueName: "wallabag.import.pocket_html" wallabag_import.producer.redis.pocket_html: - class: Wallabag\ImportBundle\Redis\Producer + class: Wallabag\CoreBundle\Redis\Producer arguments: - "@wallabag_import.queue.redis.pocket_html" diff --git a/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php b/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php index 6f0ede269..c704c0356 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php @@ -8,7 +8,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Import\ChromeImport; -use Wallabag\ImportBundle\Redis\Producer as RedisProducer; +use Wallabag\CoreBundle\Redis\Producer as RedisProducer; class ChromeController extends BrowserController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php b/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php index 9b11d1fea..403fdbfed 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php @@ -10,7 +10,7 @@ use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; use Wallabag\CoreBundle\Form\Type\UploadImportType; use Wallabag\CoreBundle\Import\DeliciousImport; -use Wallabag\ImportBundle\Redis\Producer as RedisProducer; +use Wallabag\CoreBundle\Redis\Producer as RedisProducer; class DeliciousController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php b/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php index 033805660..bce0a9bdf 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php @@ -8,7 +8,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Import\ElcuratorImport; -use Wallabag\ImportBundle\Redis\Producer as RedisProducer; +use Wallabag\CoreBundle\Redis\Producer as RedisProducer; class ElcuratorController extends WallabagController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php b/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php index 2d17d5f62..cb7f55b97 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php @@ -8,7 +8,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Import\FirefoxImport; -use Wallabag\ImportBundle\Redis\Producer as RedisProducer; +use Wallabag\CoreBundle\Redis\Producer as RedisProducer; class FirefoxController extends BrowserController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php b/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php index 13ef18084..6bd416643 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php @@ -10,7 +10,7 @@ use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; use Wallabag\CoreBundle\Form\Type\UploadImportType; use Wallabag\CoreBundle\Import\InstapaperImport; -use Wallabag\ImportBundle\Redis\Producer as RedisProducer; +use Wallabag\CoreBundle\Redis\Producer as RedisProducer; class InstapaperController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php b/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php index 5d101604d..ea992006e 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php @@ -10,7 +10,7 @@ use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; use Wallabag\CoreBundle\Form\Type\UploadImportType; use Wallabag\CoreBundle\Import\PinboardImport; -use Wallabag\ImportBundle\Redis\Producer as RedisProducer; +use Wallabag\CoreBundle\Redis\Producer as RedisProducer; class PinboardController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/PocketController.php b/src/Wallabag/CoreBundle/Controller/Import/PocketController.php index ef510cd4f..b73f37da4 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PocketController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PocketController.php @@ -12,7 +12,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; use Wallabag\CoreBundle\Import\PocketImport; -use Wallabag\ImportBundle\Redis\Producer as RedisProducer; +use Wallabag\CoreBundle\Redis\Producer as RedisProducer; class PocketController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php b/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php index c2de4398b..fd431cc18 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php @@ -8,7 +8,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Import\PocketHtmlImport; -use Wallabag\ImportBundle\Redis\Producer as RedisProducer; +use Wallabag\CoreBundle\Redis\Producer as RedisProducer; class PocketHtmlController extends HtmlController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php b/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php index 5fc3138eb..55bd8aa55 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php @@ -10,7 +10,7 @@ use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Controller\AbstractController; use Wallabag\CoreBundle\Form\Type\UploadImportType; use Wallabag\CoreBundle\Import\ReadabilityImport; -use Wallabag\ImportBundle\Redis\Producer as RedisProducer; +use Wallabag\CoreBundle\Redis\Producer as RedisProducer; class ReadabilityController extends AbstractController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php b/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php index eef4e19ec..5c1239c68 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php @@ -8,7 +8,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Import\ShaarliImport; -use Wallabag\ImportBundle\Redis\Producer as RedisProducer; +use Wallabag\CoreBundle\Redis\Producer as RedisProducer; class ShaarliController extends HtmlController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php b/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php index c4a3bacd6..bdf39a28e 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php +++ b/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php @@ -8,7 +8,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Import\WallabagV1Import; -use Wallabag\ImportBundle\Redis\Producer as RedisProducer; +use Wallabag\CoreBundle\Redis\Producer as RedisProducer; class WallabagV1Controller extends WallabagController { diff --git a/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php b/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php index f5ea6e746..288991d54 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php +++ b/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php @@ -8,7 +8,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Import\WallabagV2Import; -use Wallabag\ImportBundle\Redis\Producer as RedisProducer; +use Wallabag\CoreBundle\Redis\Producer as RedisProducer; class WallabagV2Controller extends WallabagController { diff --git a/src/Wallabag/ImportBundle/Redis/Producer.php b/src/Wallabag/CoreBundle/Redis/Producer.php similarity index 96% rename from src/Wallabag/ImportBundle/Redis/Producer.php rename to src/Wallabag/CoreBundle/Redis/Producer.php index c77b51747..fbab0265a 100644 --- a/src/Wallabag/ImportBundle/Redis/Producer.php +++ b/src/Wallabag/CoreBundle/Redis/Producer.php @@ -1,6 +1,6 @@ Date: Sun, 31 Dec 2023 22:07:37 +0100 Subject: [PATCH 32/38] Move Import templates to Core --- .../CoreBundle/Controller/Import/ChromeController.php | 2 +- .../CoreBundle/Controller/Import/DeliciousController.php | 2 +- .../CoreBundle/Controller/Import/ElcuratorController.php | 2 +- .../CoreBundle/Controller/Import/FirefoxController.php | 2 +- .../CoreBundle/Controller/Import/ImportController.php | 6 +++--- .../CoreBundle/Controller/Import/InstapaperController.php | 2 +- .../CoreBundle/Controller/Import/PinboardController.php | 2 +- .../CoreBundle/Controller/Import/PocketController.php | 2 +- .../CoreBundle/Controller/Import/PocketHtmlController.php | 2 +- .../CoreBundle/Controller/Import/ReadabilityController.php | 2 +- .../CoreBundle/Controller/Import/ShaarliController.php | 2 +- .../CoreBundle/Controller/Import/WallabagV1Controller.php | 2 +- .../CoreBundle/Controller/Import/WallabagV2Controller.php | 2 +- .../Resources/views/Import}/Chrome/index.html.twig | 2 +- .../Resources/views/Import}/Delicious/index.html.twig | 2 +- .../Resources/views/Import}/Elcurator/index.html.twig | 2 +- .../Resources/views/Import}/Firefox/index.html.twig | 2 +- .../Resources/views/Import}/Instapaper/index.html.twig | 2 +- .../Resources/views/Import}/Pinboard/index.html.twig | 2 +- .../Resources/views/Import}/Pocket/index.html.twig | 2 +- .../Resources/views/Import}/PocketHtml/index.html.twig | 2 +- .../Resources/views/Import}/Readability/index.html.twig | 2 +- .../Resources/views/Import}/Shaarli/index.html.twig | 2 +- .../Resources/views/Import}/WallabagV1/index.html.twig | 2 +- .../Resources/views/Import}/WallabagV2/index.html.twig | 2 +- .../Resources/views/Import/_information.html.twig | 0 .../Resources/views/Import/check_queue.html.twig | 0 .../Resources/views/Import/index.html.twig | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) rename src/Wallabag/{ImportBundle/Resources/views => CoreBundle/Resources/views/Import}/Chrome/index.html.twig (96%) rename src/Wallabag/{ImportBundle/Resources/views => CoreBundle/Resources/views/Import}/Delicious/index.html.twig (96%) rename src/Wallabag/{ImportBundle/Resources/views => CoreBundle/Resources/views/Import}/Elcurator/index.html.twig (53%) rename src/Wallabag/{ImportBundle/Resources/views => CoreBundle/Resources/views/Import}/Firefox/index.html.twig (96%) rename src/Wallabag/{ImportBundle/Resources/views => CoreBundle/Resources/views/Import}/Instapaper/index.html.twig (96%) rename src/Wallabag/{ImportBundle/Resources/views => CoreBundle/Resources/views/Import}/Pinboard/index.html.twig (96%) rename src/Wallabag/{ImportBundle/Resources/views => CoreBundle/Resources/views/Import}/Pocket/index.html.twig (95%) rename src/Wallabag/{ImportBundle/Resources/views => CoreBundle/Resources/views/Import}/PocketHtml/index.html.twig (96%) rename src/Wallabag/{ImportBundle/Resources/views => CoreBundle/Resources/views/Import}/Readability/index.html.twig (96%) rename src/Wallabag/{ImportBundle/Resources/views => CoreBundle/Resources/views/Import}/Shaarli/index.html.twig (96%) rename src/Wallabag/{ImportBundle/Resources/views => CoreBundle/Resources/views/Import}/WallabagV1/index.html.twig (96%) rename src/Wallabag/{ImportBundle/Resources/views => CoreBundle/Resources/views/Import}/WallabagV2/index.html.twig (54%) rename src/Wallabag/{ImportBundle => CoreBundle}/Resources/views/Import/_information.html.twig (100%) rename src/Wallabag/{ImportBundle => CoreBundle}/Resources/views/Import/check_queue.html.twig (100%) rename src/Wallabag/{ImportBundle => CoreBundle}/Resources/views/Import/index.html.twig (92%) diff --git a/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php b/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php index c704c0356..61636f4ff 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ChromeController.php @@ -46,6 +46,6 @@ class ChromeController extends BrowserController protected function getImportTemplate() { - return '@WallabagImport/Chrome/index.html.twig'; + return '@WallabagCore/Import/Chrome/index.html.twig'; } } diff --git a/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php b/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php index 403fdbfed..e495fe143 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php @@ -76,7 +76,7 @@ class DeliciousController extends AbstractController $this->addFlash('notice', 'flashes.import.notice.failed_on_file'); } - return $this->render('@WallabagImport/Delicious/index.html.twig', [ + return $this->render('@WallabagCore/Import/Delicious/index.html.twig', [ 'form' => $form->createView(), 'import' => $delicious, ]); diff --git a/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php b/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php index bce0a9bdf..95b846ec9 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ElcuratorController.php @@ -46,6 +46,6 @@ class ElcuratorController extends WallabagController protected function getImportTemplate() { - return '@WallabagImport/Elcurator/index.html.twig'; + return '@WallabagCore/Import/Elcurator/index.html.twig'; } } diff --git a/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php b/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php index cb7f55b97..b28d2555e 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/FirefoxController.php @@ -46,6 +46,6 @@ class FirefoxController extends BrowserController protected function getImportTemplate() { - return '@WallabagImport/Firefox/index.html.twig'; + return '@WallabagCore/Import/Firefox/index.html.twig'; } } diff --git a/src/Wallabag/CoreBundle/Controller/Import/ImportController.php b/src/Wallabag/CoreBundle/Controller/Import/ImportController.php index ce60989fb..8361f8240 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ImportController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ImportController.php @@ -24,7 +24,7 @@ class ImportController extends AbstractController */ public function importAction(ImportChain $importChain) { - return $this->render('@WallabagImport/Import/index.html.twig', [ + return $this->render('@WallabagCore/Import/index.html.twig', [ 'imports' => $importChain->getAll(), ]); } @@ -41,7 +41,7 @@ class ImportController extends AbstractController $rabbitNotInstalled = false; if (!$authorizationChecker->isGranted('ROLE_SUPER_ADMIN')) { - return $this->render('@WallabagImport/Import/check_queue.html.twig'); + return $this->render('@WallabagCore/Import/check_queue.html.twig'); } if ($craueConfig->get('import_with_rabbitmq')) { @@ -85,7 +85,7 @@ class ImportController extends AbstractController } } - return $this->render('@WallabagImport/Import/check_queue.html.twig', [ + return $this->render('@WallabagCore/Import/check_queue.html.twig', [ 'nbRedisMessages' => $nbRedisMessages, 'nbRabbitMessages' => $nbRabbitMessages, 'redisNotInstalled' => $redisNotInstalled, diff --git a/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php b/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php index 6bd416643..c9999c6dc 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php @@ -76,7 +76,7 @@ class InstapaperController extends AbstractController $this->addFlash('notice', 'flashes.import.notice.failed_on_file'); } - return $this->render('@WallabagImport/Instapaper/index.html.twig', [ + return $this->render('@WallabagCore/Import/Instapaper/index.html.twig', [ 'form' => $form->createView(), 'import' => $instapaper, ]); diff --git a/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php b/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php index ea992006e..8a33f04f1 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php @@ -76,7 +76,7 @@ class PinboardController extends AbstractController $this->addFlash('notice', 'flashes.import.notice.failed_on_file'); } - return $this->render('@WallabagImport/Pinboard/index.html.twig', [ + return $this->render('@WallabagCore/Import/Pinboard/index.html.twig', [ 'form' => $form->createView(), 'import' => $pinboard, ]); diff --git a/src/Wallabag/CoreBundle/Controller/Import/PocketController.php b/src/Wallabag/CoreBundle/Controller/Import/PocketController.php index b73f37da4..ba95d3874 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PocketController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PocketController.php @@ -43,7 +43,7 @@ class PocketController extends AbstractController ]) ->getForm(); - return $this->render('@WallabagImport/Pocket/index.html.twig', [ + return $this->render('@WallabagCore/Import/Pocket/index.html.twig', [ 'import' => $pocket, 'has_consumer_key' => '' === trim($this->getUser()->getConfig()->getPocketConsumerKey()) ? false : true, 'form' => $form->createView(), diff --git a/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php b/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php index fd431cc18..2812202db 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PocketHtmlController.php @@ -46,6 +46,6 @@ class PocketHtmlController extends HtmlController protected function getImportTemplate() { - return '@WallabagImport/PocketHtml/index.html.twig'; + return '@WallabagCore/Import/PocketHtml/index.html.twig'; } } diff --git a/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php b/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php index 55bd8aa55..8a5988bcb 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php @@ -76,7 +76,7 @@ class ReadabilityController extends AbstractController $this->addFlash('notice', 'flashes.import.notice.failed_on_file'); } - return $this->render('@WallabagImport/Readability/index.html.twig', [ + return $this->render('@WallabagCore/Import/Readability/index.html.twig', [ 'form' => $form->createView(), 'import' => $readability, ]); diff --git a/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php b/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php index 5c1239c68..52973042e 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ShaarliController.php @@ -46,6 +46,6 @@ class ShaarliController extends HtmlController protected function getImportTemplate() { - return '@WallabagImport/Shaarli/index.html.twig'; + return '@WallabagCore/Import/Shaarli/index.html.twig'; } } diff --git a/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php b/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php index bdf39a28e..bb2f8a9ae 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php +++ b/src/Wallabag/CoreBundle/Controller/Import/WallabagV1Controller.php @@ -46,6 +46,6 @@ class WallabagV1Controller extends WallabagController protected function getImportTemplate() { - return '@WallabagImport/WallabagV1/index.html.twig'; + return '@WallabagCore/Import/WallabagV1/index.html.twig'; } } diff --git a/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php b/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php index 288991d54..3cf267719 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php +++ b/src/Wallabag/CoreBundle/Controller/Import/WallabagV2Controller.php @@ -46,6 +46,6 @@ class WallabagV2Controller extends WallabagController protected function getImportTemplate() { - return '@WallabagImport/WallabagV2/index.html.twig'; + return '@WallabagCore/Import/WallabagV2/index.html.twig'; } } diff --git a/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/Chrome/index.html.twig similarity index 96% rename from src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/Chrome/index.html.twig index 331251046..b31b44d5e 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/Chrome/index.html.twig @@ -6,7 +6,7 @@
- {% include '@WallabagImport/Import/_information.html.twig' %} + {% include '@WallabagCore/Import/_information.html.twig' %}
{{ import.description|trans|raw }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Delicious/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/Delicious/index.html.twig similarity index 96% rename from src/Wallabag/ImportBundle/Resources/views/Delicious/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/Delicious/index.html.twig index 8e5741c45..f4a80d19d 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Delicious/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/Delicious/index.html.twig @@ -6,7 +6,7 @@
- {% include '@WallabagImport/Import/_information.html.twig' %} + {% include '@WallabagCore/Import/_information.html.twig' %}
{{ import.description|trans }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Elcurator/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/Elcurator/index.html.twig similarity index 53% rename from src/Wallabag/ImportBundle/Resources/views/Elcurator/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/Elcurator/index.html.twig index 2d950c95c..092df335a 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Elcurator/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/Elcurator/index.html.twig @@ -1,3 +1,3 @@ -{% extends "@WallabagImport/WallabagV1/index.html.twig" %} +{% extends "@WallabagCore/Import/WallabagV1/index.html.twig" %} {% block title %}{{ 'import.elcurator.page_title'|trans }}{% endblock %} diff --git a/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/Firefox/index.html.twig similarity index 96% rename from src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/Firefox/index.html.twig index e262da8a6..9ba162411 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/Firefox/index.html.twig @@ -6,7 +6,7 @@
- {% include '@WallabagImport/Import/_information.html.twig' %} + {% include '@WallabagCore/Import/_information.html.twig' %}
{{ import.description|trans|raw }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/Instapaper/index.html.twig similarity index 96% rename from src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/Instapaper/index.html.twig index 38f5eeda6..78cd7ffe3 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/Instapaper/index.html.twig @@ -6,7 +6,7 @@
- {% include '@WallabagImport/Import/_information.html.twig' %} + {% include '@WallabagCore/Import/_information.html.twig' %}
{{ import.description|trans }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Pinboard/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/Pinboard/index.html.twig similarity index 96% rename from src/Wallabag/ImportBundle/Resources/views/Pinboard/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/Pinboard/index.html.twig index 9c79e088c..60e9c3618 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Pinboard/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/Pinboard/index.html.twig @@ -6,7 +6,7 @@
- {% include '@WallabagImport/Import/_information.html.twig' %} + {% include '@WallabagCore/Import/_information.html.twig' %}
{{ import.description|trans }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/Pocket/index.html.twig similarity index 95% rename from src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/Pocket/index.html.twig index 781b873e1..c015c06fb 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/Pocket/index.html.twig @@ -6,7 +6,7 @@
- {% include '@WallabagImport/Import/_information.html.twig' %} + {% include '@WallabagCore/Import/_information.html.twig' %} {% if not has_consumer_key %}
diff --git a/src/Wallabag/ImportBundle/Resources/views/PocketHtml/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/PocketHtml/index.html.twig similarity index 96% rename from src/Wallabag/ImportBundle/Resources/views/PocketHtml/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/PocketHtml/index.html.twig index 09f2e689f..b2daf7852 100644 --- a/src/Wallabag/ImportBundle/Resources/views/PocketHtml/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/PocketHtml/index.html.twig @@ -6,7 +6,7 @@
- {% include '@WallabagImport/Import/_information.html.twig' %} + {% include '@WallabagCore/Import/_information.html.twig' %}
{{ import.description|trans|raw }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/Readability/index.html.twig similarity index 96% rename from src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/Readability/index.html.twig index 70eceb103..5e362d8db 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/Readability/index.html.twig @@ -6,7 +6,7 @@
- {% include '@WallabagImport/Import/_information.html.twig' %} + {% include '@WallabagCore/Import/_information.html.twig' %}
{{ import.description|trans }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Shaarli/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/Shaarli/index.html.twig similarity index 96% rename from src/Wallabag/ImportBundle/Resources/views/Shaarli/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/Shaarli/index.html.twig index edb24e468..cbf54ff87 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Shaarli/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/Shaarli/index.html.twig @@ -6,7 +6,7 @@
- {% include '@WallabagImport/Import/_information.html.twig' %} + {% include '@WallabagCore/Import/_information.html.twig' %}
{{ import.description|trans|raw }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/WallabagV1/index.html.twig similarity index 96% rename from src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/WallabagV1/index.html.twig index 6e0598afa..c70a27c15 100644 --- a/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/WallabagV1/index.html.twig @@ -6,7 +6,7 @@
- {% include '@WallabagImport/Import/_information.html.twig' %} + {% include '@WallabagCore/Import/_information.html.twig' %}
{{ import.description|trans }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/WallabagV2/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/WallabagV2/index.html.twig similarity index 54% rename from src/Wallabag/ImportBundle/Resources/views/WallabagV2/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/WallabagV2/index.html.twig index 2521578c8..26b6c253c 100644 --- a/src/Wallabag/ImportBundle/Resources/views/WallabagV2/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/WallabagV2/index.html.twig @@ -1,3 +1,3 @@ -{% extends "@WallabagImport/WallabagV1/index.html.twig" %} +{% extends "@WallabagCore/Import/WallabagV1/index.html.twig" %} {% block title %}{{ 'import.wallabag_v2.page_title'|trans }}{% endblock %} diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/_information.html.twig similarity index 100% rename from src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/_information.html.twig diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/check_queue.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/check_queue.html.twig similarity index 100% rename from src/Wallabag/ImportBundle/Resources/views/Import/check_queue.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/check_queue.html.twig diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Import/index.html.twig similarity index 92% rename from src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig rename to src/Wallabag/CoreBundle/Resources/views/Import/index.html.twig index 7eb677193..2654709d0 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Import/index.html.twig @@ -12,7 +12,7 @@
- {% include '@WallabagImport/Import/_information.html.twig' %} + {% include '@WallabagCore/Import/_information.html.twig' %} {{ 'import.page_description'|trans }}
    From 6552c84eecdb2b9e394242f6d1344c6113788541 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 1 Jan 2024 17:04:08 +0100 Subject: [PATCH 33/38] Move Import configuration to Core --- app/config/wallabag.yml | 2 -- .../CoreBundle/DependencyInjection/Configuration.php | 5 +++++ .../DependencyInjection/WallabagCoreExtension.php | 2 ++ .../DependencyInjection/Configuration.php | 11 ----------- .../DependencyInjection/WallabagImportExtension.php | 4 ---- 5 files changed, 7 insertions(+), 17 deletions(-) diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index ee4ba86f9..954fa7879 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -162,7 +162,5 @@ wallabag_core: - 'Montserrat' - 'OpenDyslexicRegular' - 'Oswald' - -wallabag_import: allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv', 'text/html'] resource_dir: "%kernel.project_dir%/web/uploads/import" diff --git a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php index edb43795e..104799ced 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php @@ -75,6 +75,11 @@ class Configuration implements ConfigurationInterface ->arrayNode('fonts') ->prototype('scalar')->end() ->end() + ->arrayNode('allow_mimetypes') + ->prototype('scalar')->end() + ->end() + ->scalarNode('resource_dir') + ->end() ->end() ; diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index 155f05372..6dfde41fb 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php @@ -30,6 +30,8 @@ class WallabagCoreExtension extends Extension $container->setParameter('wallabag_core.site_credentials.encryption_key_path', $config['encryption_key_path']); $container->setParameter('wallabag_core.default_ignore_origin_instance_rules', $config['default_ignore_origin_instance_rules']); $container->setParameter('wallabag_core.fonts', $config['fonts']); + $container->setParameter('wallabag_import.allow_mimetypes', $config['allow_mimetypes']); + $container->setParameter('wallabag_import.resource_dir', $config['resource_dir']); } public function getAlias() diff --git a/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php b/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php index 3694c863e..e9e893e1a 100644 --- a/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php @@ -10,17 +10,6 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder('wallabag_import'); - $rootNode = $treeBuilder->getRootNode(); - - $rootNode - ->children() - ->arrayNode('allow_mimetypes') - ->prototype('scalar')->end() - ->end() - ->scalarNode('resource_dir') - ->end() - ->end() - ; return $treeBuilder; } diff --git a/src/Wallabag/ImportBundle/DependencyInjection/WallabagImportExtension.php b/src/Wallabag/ImportBundle/DependencyInjection/WallabagImportExtension.php index 2aa7d26fa..199774c70 100644 --- a/src/Wallabag/ImportBundle/DependencyInjection/WallabagImportExtension.php +++ b/src/Wallabag/ImportBundle/DependencyInjection/WallabagImportExtension.php @@ -9,10 +9,6 @@ class WallabagImportExtension extends Extension { public function load(array $configs, ContainerBuilder $container) { - $configuration = new Configuration(); - $config = $this->processConfiguration($configuration, $configs); - $container->setParameter('wallabag_import.allow_mimetypes', $config['allow_mimetypes']); - $container->setParameter('wallabag_import.resource_dir', $config['resource_dir']); } public function getAlias() From 2c651691278396dd38e424846bc04a971891b95e Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 1 Jan 2024 17:05:20 +0100 Subject: [PATCH 34/38] Remove ImportBundle --- app/AppKernel.php | 1 - src/Wallabag/CoreBundle/WallabagCoreBundle.php | 8 ++++++++ .../DependencyInjection/Configuration.php | 16 ---------------- .../WallabagImportExtension.php | 18 ------------------ .../ImportBundle/WallabagImportBundle.php | 17 ----------------- 5 files changed, 8 insertions(+), 52 deletions(-) delete mode 100644 src/Wallabag/ImportBundle/DependencyInjection/Configuration.php delete mode 100644 src/Wallabag/ImportBundle/DependencyInjection/WallabagImportExtension.php delete mode 100644 src/Wallabag/ImportBundle/WallabagImportBundle.php diff --git a/app/AppKernel.php b/app/AppKernel.php index 98a17e095..216cacf29 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -38,7 +38,6 @@ class AppKernel extends Kernel // wallabag bundles new Wallabag\CoreBundle\WallabagCoreBundle(), - new Wallabag\ImportBundle\WallabagImportBundle(), ]; if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { diff --git a/src/Wallabag/CoreBundle/WallabagCoreBundle.php b/src/Wallabag/CoreBundle/WallabagCoreBundle.php index f5899e39c..e6fae41a1 100644 --- a/src/Wallabag/CoreBundle/WallabagCoreBundle.php +++ b/src/Wallabag/CoreBundle/WallabagCoreBundle.php @@ -2,8 +2,16 @@ namespace Wallabag\CoreBundle; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; +use Wallabag\CoreBundle\Import\ImportCompilerPass; class WallabagCoreBundle extends Bundle { + public function build(ContainerBuilder $container) + { + parent::build($container); + + $container->addCompilerPass(new ImportCompilerPass()); + } } diff --git a/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php b/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php deleted file mode 100644 index e9e893e1a..000000000 --- a/src/Wallabag/ImportBundle/DependencyInjection/Configuration.php +++ /dev/null @@ -1,16 +0,0 @@ -addCompilerPass(new ImportCompilerPass()); - } -} From bda26c21cf69955dfb92875c057476f3813cd00b Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 1 Jan 2024 17:15:20 +0100 Subject: [PATCH 35/38] Rename wallabag_import to wallabag_core --- app/config/config.yml | 26 ++--- app/config/services.yml | 54 +++++------ app/config/services_rabbit.yml | 24 ++--- app/config/services_redis.yml | 96 +++++++++---------- .../Command/Import/RedisWorkerCommand.php | 6 +- .../Controller/Import/BrowserController.php | 6 +- .../Controller/Import/DeliciousController.php | 6 +- .../Controller/Import/HtmlController.php | 6 +- .../Import/InstapaperController.php | 6 +- .../Controller/Import/PinboardController.php | 6 +- .../Import/ReadabilityController.php | 6 +- .../Controller/Import/WallabagController.php | 6 +- .../WallabagCoreExtension.php | 4 +- .../CoreBundle/Import/ImportCompilerPass.php | 2 +- .../Import/ImportCompilerPassTest.php | 2 +- 15 files changed, 128 insertions(+), 128 deletions(-) diff --git a/app/config/config.yml b/app/config/config.yml index a53562f7d..6cd6557e6 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -285,7 +285,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.pocket' - callback: wallabag_import.consumer.amqp.pocket + callback: wallabag_core.consumer.amqp.pocket qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_readability: connection: default @@ -294,7 +294,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.readability' - callback: wallabag_import.consumer.amqp.readability + callback: wallabag_core.consumer.amqp.readability qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_instapaper: connection: default @@ -303,7 +303,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.instapaper' - callback: wallabag_import.consumer.amqp.instapaper + callback: wallabag_core.consumer.amqp.instapaper qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_pinboard: connection: default @@ -312,7 +312,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.pinboard' - callback: wallabag_import.consumer.amqp.pinboard + callback: wallabag_core.consumer.amqp.pinboard qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_delicious: connection: default @@ -321,7 +321,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.delicious' - callback: wallabag_import.consumer.amqp.delicious + callback: wallabag_core.consumer.amqp.delicious qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_wallabag_v1: connection: default @@ -330,7 +330,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.wallabag_v1' - callback: wallabag_import.consumer.amqp.wallabag_v1 + callback: wallabag_core.consumer.amqp.wallabag_v1 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_wallabag_v2: connection: default @@ -339,7 +339,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.wallabag_v2' - callback: wallabag_import.consumer.amqp.wallabag_v2 + callback: wallabag_core.consumer.amqp.wallabag_v2 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_elcurator: connection: default @@ -348,7 +348,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.elcurator' - callback: wallabag_import.consumer.amqp.elcurator + callback: wallabag_core.consumer.amqp.elcurator qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_firefox: connection: default @@ -357,7 +357,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.firefox' - callback: wallabag_import.consumer.amqp.firefox + callback: wallabag_core.consumer.amqp.firefox qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_chrome: connection: default @@ -366,7 +366,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.chrome' - callback: wallabag_import.consumer.amqp.chrome + callback: wallabag_core.consumer.amqp.chrome qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_shaarli: connection: default @@ -375,7 +375,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.shaarli' - callback: wallabag_import.consumer.amqp.shaarli + callback: wallabag_core.consumer.amqp.shaarli qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} import_pocket_html: connection: default @@ -384,7 +384,7 @@ old_sound_rabbit_mq: type: topic queue_options: name: 'wallabag.import.pocket_html' - callback: wallabag_import.consumer.amqp.pocket_html + callback: wallabag_core.consumer.amqp.pocket_html qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"} fos_js_routing: @@ -424,7 +424,7 @@ httplug: wallabag_core.entry.download_images: factory: 'httplug.factory.auto' plugins: ['httplug.plugin.logger'] - wallabag_import.pocket.client: + wallabag_core.pocket.client: factory: 'httplug.factory.auto' plugins: - 'httplug.plugin.logger' diff --git a/app/config/services.yml b/app/config/services.yml index de4a5f696..3e89e29df 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -46,62 +46,62 @@ services: Wallabag\CoreBundle\Controller\Import\ChromeController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_chrome_producer' - $redisProducer: '@wallabag_import.producer.redis.chrome' + $redisProducer: '@wallabag_core.producer.redis.chrome' Wallabag\CoreBundle\Controller\Import\DeliciousController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_delicious_producer' - $redisProducer: '@wallabag_import.producer.redis.delicious' + $redisProducer: '@wallabag_core.producer.redis.delicious' Wallabag\CoreBundle\Controller\Import\ElcuratorController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_elcurator_producer' - $redisProducer: '@wallabag_import.producer.redis.elcurator' + $redisProducer: '@wallabag_core.producer.redis.elcurator' Wallabag\CoreBundle\Controller\Import\FirefoxController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_firefox_producer' - $redisProducer: '@wallabag_import.producer.redis.firefox' + $redisProducer: '@wallabag_core.producer.redis.firefox' Wallabag\CoreBundle\Controller\Import\InstapaperController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_instapaper_producer' - $redisProducer: '@wallabag_import.producer.redis.instapaper' + $redisProducer: '@wallabag_core.producer.redis.instapaper' Wallabag\CoreBundle\Controller\Import\PinboardController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_pinboard_producer' - $redisProducer: '@wallabag_import.producer.redis.pinboard' + $redisProducer: '@wallabag_core.producer.redis.pinboard' Wallabag\CoreBundle\Controller\Import\PocketController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_pocket_producer' - $redisProducer: '@wallabag_import.producer.redis.pocket' + $redisProducer: '@wallabag_core.producer.redis.pocket' Wallabag\CoreBundle\Controller\Import\ReadabilityController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_readability_producer' - $redisProducer: '@wallabag_import.producer.redis.readability' + $redisProducer: '@wallabag_core.producer.redis.readability' Wallabag\CoreBundle\Controller\Import\WallabagV1Controller: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_wallabag_v1_producer' - $redisProducer: '@wallabag_import.producer.redis.wallabag_v1' + $redisProducer: '@wallabag_core.producer.redis.wallabag_v1' Wallabag\CoreBundle\Controller\Import\WallabagV2Controller: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_wallabag_v2_producer' - $redisProducer: '@wallabag_import.producer.redis.wallabag_v2' + $redisProducer: '@wallabag_core.producer.redis.wallabag_v2' Wallabag\CoreBundle\Controller\Import\ShaarliController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_shaarli_producer' - $redisProducer: '@wallabag_import.producer.redis.shaarli' + $redisProducer: '@wallabag_core.producer.redis.shaarli' Wallabag\CoreBundle\Controller\Import\PocketHtmlController: arguments: $rabbitMqProducer: '@old_sound_rabbit_mq.import_pocket_html_producer' - $redisProducer: '@wallabag_import.producer.redis.pocket_html' + $redisProducer: '@wallabag_core.producer.redis.pocket_html' Doctrine\DBAL\Connection: alias: doctrine.dbal.default_connection @@ -322,58 +322,58 @@ services: tags: - { name: kernel.event_listener, event: security.authentication.failure, method: onAuthenticationFailure } - wallabag_import.pocket.client: - alias: 'httplug.client.wallabag_import.pocket.client' + wallabag_core.pocket.client: + alias: 'httplug.client.wallabag_core.pocket.client' Wallabag\CoreBundle\Import\PocketImport: calls: - - [ setClient, [ "@wallabag_import.pocket.client" ] ] + - [ setClient, [ "@wallabag_core.pocket.client" ] ] tags: - - { name: wallabag_import.import, alias: pocket } + - { name: wallabag_core.import, alias: pocket } Wallabag\CoreBundle\Import\WallabagV1Import: tags: - - { name: wallabag_import.import, alias: wallabag_v1 } + - { name: wallabag_core.import, alias: wallabag_v1 } Wallabag\CoreBundle\Import\WallabagV2Import: tags: - - { name: wallabag_import.import, alias: wallabag_v2 } + - { name: wallabag_core.import, alias: wallabag_v2 } Wallabag\CoreBundle\Import\ElcuratorImport: tags: - - { name: wallabag_import.import, alias: elcurator } + - { name: wallabag_core.import, alias: elcurator } Wallabag\CoreBundle\Import\ReadabilityImport: tags: - - { name: wallabag_import.import, alias: readability } + - { name: wallabag_core.import, alias: readability } Wallabag\CoreBundle\Import\InstapaperImport: tags: - - { name: wallabag_import.import, alias: instapaper } + - { name: wallabag_core.import, alias: instapaper } Wallabag\CoreBundle\Import\PinboardImport: tags: - - { name: wallabag_import.import, alias: pinboard } + - { name: wallabag_core.import, alias: pinboard } Wallabag\CoreBundle\Import\DeliciousImport: tags: - - { name: wallabag_import.import, alias: delicious } + - { name: wallabag_core.import, alias: delicious } Wallabag\CoreBundle\Import\FirefoxImport: tags: - - { name: wallabag_import.import, alias: firefox } + - { name: wallabag_core.import, alias: firefox } Wallabag\CoreBundle\Import\ChromeImport: tags: - - { name: wallabag_import.import, alias: chrome } + - { name: wallabag_core.import, alias: chrome } Wallabag\CoreBundle\Import\ShaarliImport: tags: - - { name: wallabag_import.import, alias: shaarli } + - { name: wallabag_core.import, alias: shaarli } Wallabag\CoreBundle\Import\PocketHtmlImport: tags: - - { name: wallabag_import.import, alias: pocket_html } + - { name: wallabag_core.import, alias: pocket_html } # to factorize the proximity and bypass translation for prev & next pagerfanta.view.default_wallabag: diff --git a/app/config/services_rabbit.yml b/app/config/services_rabbit.yml index b7ab0ccd4..1a475370e 100644 --- a/app/config/services_rabbit.yml +++ b/app/config/services_rabbit.yml @@ -20,62 +20,62 @@ services: $shaarliConsumer: '@old_sound_rabbit_mq.import_shaarli_consumer' $pocketHtmlConsumer: '@old_sound_rabbit_mq.import_pocket_html_consumer' - wallabag_import.consumer.amqp.pocket: + wallabag_core.consumer.amqp.pocket: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\PocketImport' - wallabag_import.consumer.amqp.readability: + wallabag_core.consumer.amqp.readability: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\ReadabilityImport' - wallabag_import.consumer.amqp.instapaper: + wallabag_core.consumer.amqp.instapaper: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\InstapaperImport' - wallabag_import.consumer.amqp.pinboard: + wallabag_core.consumer.amqp.pinboard: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\PinboardImport' - wallabag_import.consumer.amqp.delicious: + wallabag_core.consumer.amqp.delicious: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\DeliciousImport' - wallabag_import.consumer.amqp.wallabag_v1: + wallabag_core.consumer.amqp.wallabag_v1: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\WallabagV1Import' - wallabag_import.consumer.amqp.wallabag_v2: + wallabag_core.consumer.amqp.wallabag_v2: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\WallabagV2Import' - wallabag_import.consumer.amqp.elcurator: + wallabag_core.consumer.amqp.elcurator: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\ElcuratorImport' - wallabag_import.consumer.amqp.firefox: + wallabag_core.consumer.amqp.firefox: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\FirefoxImport' - wallabag_import.consumer.amqp.chrome: + wallabag_core.consumer.amqp.chrome: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\ChromeImport' - wallabag_import.consumer.amqp.shaarli: + wallabag_core.consumer.amqp.shaarli: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\ShaarliImport' - wallabag_import.consumer.amqp.pocket_html: + wallabag_core.consumer.amqp.pocket_html: class: Wallabag\CoreBundle\Consumer\AMQPEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\PocketHtmlImport' diff --git a/app/config/services_redis.yml b/app/config/services_redis.yml index 11fc0dac3..3f052b293 100644 --- a/app/config/services_redis.yml +++ b/app/config/services_redis.yml @@ -6,193 +6,193 @@ services: public: true # readability - wallabag_import.queue.redis.readability: + wallabag_core.queue.redis.readability: class: Simpleue\Queue\RedisQueue arguments: $queueName: "wallabag.import.readability" - wallabag_import.producer.redis.readability: + wallabag_core.producer.redis.readability: class: Wallabag\CoreBundle\Redis\Producer arguments: - - "@wallabag_import.queue.redis.readability" + - "@wallabag_core.queue.redis.readability" - wallabag_import.consumer.redis.readability: + wallabag_core.consumer.redis.readability: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\ReadabilityImport' # instapaper - wallabag_import.queue.redis.instapaper: + wallabag_core.queue.redis.instapaper: class: Simpleue\Queue\RedisQueue arguments: $queueName: "wallabag.import.instapaper" - wallabag_import.producer.redis.instapaper: + wallabag_core.producer.redis.instapaper: class: Wallabag\CoreBundle\Redis\Producer arguments: - - "@wallabag_import.queue.redis.instapaper" + - "@wallabag_core.queue.redis.instapaper" - wallabag_import.consumer.redis.instapaper: + wallabag_core.consumer.redis.instapaper: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\InstapaperImport' # pinboard - wallabag_import.queue.redis.pinboard: + wallabag_core.queue.redis.pinboard: class: Simpleue\Queue\RedisQueue arguments: $queueName: "wallabag.import.pinboard" - wallabag_import.producer.redis.pinboard: + wallabag_core.producer.redis.pinboard: class: Wallabag\CoreBundle\Redis\Producer arguments: - - "@wallabag_import.queue.redis.pinboard" + - "@wallabag_core.queue.redis.pinboard" - wallabag_import.consumer.redis.pinboard: + wallabag_core.consumer.redis.pinboard: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\PinboardImport' # delicious - wallabag_import.queue.redis.delicious: + wallabag_core.queue.redis.delicious: class: Simpleue\Queue\RedisQueue arguments: $queueName: "wallabag.import.delicious" - wallabag_import.producer.redis.delicious: + wallabag_core.producer.redis.delicious: class: Wallabag\CoreBundle\Redis\Producer arguments: - - "@wallabag_import.queue.redis.delicious" + - "@wallabag_core.queue.redis.delicious" - wallabag_import.consumer.redis.delicious: + wallabag_core.consumer.redis.delicious: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\DeliciousImport' # pocket - wallabag_import.queue.redis.pocket: + wallabag_core.queue.redis.pocket: class: Simpleue\Queue\RedisQueue arguments: $queueName: "wallabag.import.pocket" - wallabag_import.producer.redis.pocket: + wallabag_core.producer.redis.pocket: class: Wallabag\CoreBundle\Redis\Producer arguments: - - "@wallabag_import.queue.redis.pocket" + - "@wallabag_core.queue.redis.pocket" - wallabag_import.consumer.redis.pocket: + wallabag_core.consumer.redis.pocket: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\PocketImport' # wallabag v1 - wallabag_import.queue.redis.wallabag_v1: + wallabag_core.queue.redis.wallabag_v1: class: Simpleue\Queue\RedisQueue arguments: $queueName: "wallabag.import.wallabag_v1" - wallabag_import.producer.redis.wallabag_v1: + wallabag_core.producer.redis.wallabag_v1: class: Wallabag\CoreBundle\Redis\Producer arguments: - - "@wallabag_import.queue.redis.wallabag_v1" + - "@wallabag_core.queue.redis.wallabag_v1" - wallabag_import.consumer.redis.wallabag_v1: + wallabag_core.consumer.redis.wallabag_v1: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\WallabagV1Import' # wallabag v2 - wallabag_import.queue.redis.wallabag_v2: + wallabag_core.queue.redis.wallabag_v2: class: Simpleue\Queue\RedisQueue arguments: $queueName: "wallabag.import.wallabag_v2" - wallabag_import.producer.redis.wallabag_v2: + wallabag_core.producer.redis.wallabag_v2: class: Wallabag\CoreBundle\Redis\Producer arguments: - - "@wallabag_import.queue.redis.wallabag_v2" + - "@wallabag_core.queue.redis.wallabag_v2" - wallabag_import.consumer.redis.wallabag_v2: + wallabag_core.consumer.redis.wallabag_v2: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\WallabagV2Import' # elcurator - wallabag_import.queue.redis.elcurator: + wallabag_core.queue.redis.elcurator: class: Simpleue\Queue\RedisQueue arguments: $queueName: "wallabag.import.elcurator" - wallabag_import.producer.redis.elcurator: + wallabag_core.producer.redis.elcurator: class: Wallabag\CoreBundle\Redis\Producer arguments: - - "@wallabag_import.queue.redis.elcurator" + - "@wallabag_core.queue.redis.elcurator" - wallabag_import.consumer.redis.elcurator: + wallabag_core.consumer.redis.elcurator: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\ElcuratorImport' # firefox - wallabag_import.queue.redis.firefox: + wallabag_core.queue.redis.firefox: class: Simpleue\Queue\RedisQueue arguments: $queueName: "wallabag.import.firefox" - wallabag_import.producer.redis.firefox: + wallabag_core.producer.redis.firefox: class: Wallabag\CoreBundle\Redis\Producer arguments: - - "@wallabag_import.queue.redis.firefox" + - "@wallabag_core.queue.redis.firefox" - wallabag_import.consumer.redis.firefox: + wallabag_core.consumer.redis.firefox: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\FirefoxImport' # chrome - wallabag_import.queue.redis.chrome: + wallabag_core.queue.redis.chrome: class: Simpleue\Queue\RedisQueue arguments: $queueName: "wallabag.import.chrome" - wallabag_import.producer.redis.chrome: + wallabag_core.producer.redis.chrome: class: Wallabag\CoreBundle\Redis\Producer arguments: - - "@wallabag_import.queue.redis.chrome" + - "@wallabag_core.queue.redis.chrome" - wallabag_import.consumer.redis.chrome: + wallabag_core.consumer.redis.chrome: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\ChromeImport' # shaarli - wallabag_import.queue.redis.shaarli: + wallabag_core.queue.redis.shaarli: class: Simpleue\Queue\RedisQueue arguments: $queueName: "wallabag.import.shaarli" - wallabag_import.producer.redis.shaarli: + wallabag_core.producer.redis.shaarli: class: Wallabag\CoreBundle\Redis\Producer arguments: - - "@wallabag_import.queue.redis.shaarli" + - "@wallabag_core.queue.redis.shaarli" - wallabag_import.consumer.redis.shaarli: + wallabag_core.consumer.redis.shaarli: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\ShaarliImport' # pocket html - wallabag_import.queue.redis.pocket_html: + wallabag_core.queue.redis.pocket_html: class: Simpleue\Queue\RedisQueue arguments: $queueName: "wallabag.import.pocket_html" - wallabag_import.producer.redis.pocket_html: + wallabag_core.producer.redis.pocket_html: class: Wallabag\CoreBundle\Redis\Producer arguments: - - "@wallabag_import.queue.redis.pocket_html" + - "@wallabag_core.queue.redis.pocket_html" - wallabag_import.consumer.redis.pocket_html: + wallabag_core.consumer.redis.pocket_html: class: Wallabag\CoreBundle\Consumer\RedisEntryConsumer arguments: $import: '@Wallabag\CoreBundle\Import\PocketHtmlImport' diff --git a/src/Wallabag/CoreBundle/Command/Import/RedisWorkerCommand.php b/src/Wallabag/CoreBundle/Command/Import/RedisWorkerCommand.php index e952a8726..4c38058b5 100644 --- a/src/Wallabag/CoreBundle/Command/Import/RedisWorkerCommand.php +++ b/src/Wallabag/CoreBundle/Command/Import/RedisWorkerCommand.php @@ -39,13 +39,13 @@ class RedisWorkerCommand extends Command $serviceName = $input->getArgument('serviceName'); - if (!$this->container->has('wallabag_import.queue.redis.' . $serviceName) || !$this->container->has('wallabag_import.consumer.redis.' . $serviceName)) { + if (!$this->container->has('wallabag_core.queue.redis.' . $serviceName) || !$this->container->has('wallabag_core.consumer.redis.' . $serviceName)) { throw new Exception(sprintf('No queue or consumer found for service name: "%s"', $input->getArgument('serviceName'))); } $worker = new QueueWorker( - $this->container->get('wallabag_import.queue.redis.' . $serviceName), - $this->container->get('wallabag_import.consumer.redis.' . $serviceName), + $this->container->get('wallabag_core.queue.redis.' . $serviceName), + $this->container->get('wallabag_core.consumer.redis.' . $serviceName), (int) $input->getOption('maxIterations') ); diff --git a/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php b/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php index c89df2e11..65f957995 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/BrowserController.php @@ -30,9 +30,9 @@ abstract class BrowserController extends AbstractController $markAsRead = $form->get('mark_as_read')->getData(); $name = $this->getUser()->getId() . '.json'; - if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) { + if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) { $res = $wallabag - ->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name) + ->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name) ->setMarkAsRead($markAsRead) ->import(); @@ -51,7 +51,7 @@ abstract class BrowserController extends AbstractController ]); } - unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name); + unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name); } $this->addFlash('notice', $message); diff --git a/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php b/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php index e495fe143..c0d9b5084 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/DeliciousController.php @@ -44,9 +44,9 @@ class DeliciousController extends AbstractController $markAsRead = $form->get('mark_as_read')->getData(); $name = 'delicious_' . $this->getUser()->getId() . '.json'; - if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) { + if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) { $res = $delicious - ->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name) + ->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name) ->setMarkAsRead($markAsRead) ->import(); @@ -65,7 +65,7 @@ class DeliciousController extends AbstractController ]); } - unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name); + unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name); } $this->addFlash('notice', $message); diff --git a/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php b/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php index e6f0af226..c34934e8f 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/HtmlController.php @@ -30,9 +30,9 @@ abstract class HtmlController extends AbstractController $markAsRead = $form->get('mark_as_read')->getData(); $name = $this->getUser()->getId() . '.html'; - if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) { + if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) { $res = $wallabag - ->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name) + ->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name) ->setMarkAsRead($markAsRead) ->import(); @@ -51,7 +51,7 @@ abstract class HtmlController extends AbstractController ]); } - unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name); + unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name); } $this->addFlash('notice', $message); diff --git a/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php b/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php index c9999c6dc..655784d22 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/InstapaperController.php @@ -44,9 +44,9 @@ class InstapaperController extends AbstractController $markAsRead = $form->get('mark_as_read')->getData(); $name = 'instapaper_' . $this->getUser()->getId() . '.csv'; - if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) { + if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) { $res = $instapaper - ->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name) + ->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name) ->setMarkAsRead($markAsRead) ->import(); @@ -65,7 +65,7 @@ class InstapaperController extends AbstractController ]); } - unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name); + unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name); } $this->addFlash('notice', $message); diff --git a/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php b/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php index 8a33f04f1..2e39eff22 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/PinboardController.php @@ -44,9 +44,9 @@ class PinboardController extends AbstractController $markAsRead = $form->get('mark_as_read')->getData(); $name = 'pinboard_' . $this->getUser()->getId() . '.json'; - if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) { + if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) { $res = $pinboard - ->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name) + ->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name) ->setMarkAsRead($markAsRead) ->import(); @@ -65,7 +65,7 @@ class PinboardController extends AbstractController ]); } - unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name); + unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name); } $this->addFlash('notice', $message); diff --git a/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php b/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php index 8a5988bcb..d7af59322 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/ReadabilityController.php @@ -44,9 +44,9 @@ class ReadabilityController extends AbstractController $markAsRead = $form->get('mark_as_read')->getData(); $name = 'readability_' . $this->getUser()->getId() . '.json'; - if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) { + if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) { $res = $readability - ->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name) + ->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name) ->setMarkAsRead($markAsRead) ->import(); @@ -65,7 +65,7 @@ class ReadabilityController extends AbstractController ]); } - unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name); + unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name); } $this->addFlash('notice', $message); diff --git a/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php b/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php index bdc830ba7..669bbb8ab 100644 --- a/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php +++ b/src/Wallabag/CoreBundle/Controller/Import/WallabagController.php @@ -33,9 +33,9 @@ abstract class WallabagController extends AbstractController $markAsRead = $form->get('mark_as_read')->getData(); $name = $this->getUser()->getId() . '.json'; - if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) { + if (null !== $file && \in_array($file->getClientMimeType(), $this->getParameter('wallabag_core.allow_mimetypes'), true) && $file->move($this->getParameter('wallabag_core.resource_dir'), $name)) { $res = $wallabag - ->setFilepath($this->getParameter('wallabag_import.resource_dir') . '/' . $name) + ->setFilepath($this->getParameter('wallabag_core.resource_dir') . '/' . $name) ->setMarkAsRead($markAsRead) ->import(); @@ -54,7 +54,7 @@ abstract class WallabagController extends AbstractController ]); } - unlink($this->getParameter('wallabag_import.resource_dir') . '/' . $name); + unlink($this->getParameter('wallabag_core.resource_dir') . '/' . $name); } $this->addFlash('notice', $message); diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index 6dfde41fb..754931681 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php @@ -30,8 +30,8 @@ class WallabagCoreExtension extends Extension $container->setParameter('wallabag_core.site_credentials.encryption_key_path', $config['encryption_key_path']); $container->setParameter('wallabag_core.default_ignore_origin_instance_rules', $config['default_ignore_origin_instance_rules']); $container->setParameter('wallabag_core.fonts', $config['fonts']); - $container->setParameter('wallabag_import.allow_mimetypes', $config['allow_mimetypes']); - $container->setParameter('wallabag_import.resource_dir', $config['resource_dir']); + $container->setParameter('wallabag_core.allow_mimetypes', $config['allow_mimetypes']); + $container->setParameter('wallabag_core.resource_dir', $config['resource_dir']); } public function getAlias() diff --git a/src/Wallabag/CoreBundle/Import/ImportCompilerPass.php b/src/Wallabag/CoreBundle/Import/ImportCompilerPass.php index 02905262a..02fdcc759 100644 --- a/src/Wallabag/CoreBundle/Import/ImportCompilerPass.php +++ b/src/Wallabag/CoreBundle/Import/ImportCompilerPass.php @@ -19,7 +19,7 @@ class ImportCompilerPass implements CompilerPassInterface ); $taggedServices = $container->findTaggedServiceIds( - 'wallabag_import.import' + 'wallabag_core.import' ); foreach ($taggedServices as $id => $tagAttributes) { foreach ($tagAttributes as $attributes) { diff --git a/tests/Wallabag/CoreBundle/Import/ImportCompilerPassTest.php b/tests/Wallabag/CoreBundle/Import/ImportCompilerPassTest.php index 723d4107c..af6df512f 100644 --- a/tests/Wallabag/CoreBundle/Import/ImportCompilerPassTest.php +++ b/tests/Wallabag/CoreBundle/Import/ImportCompilerPassTest.php @@ -27,7 +27,7 @@ class ImportCompilerPassTest extends TestCase $container ->register('foo') - ->addTag('wallabag_import.import', ['alias' => 'pocket']) + ->addTag('wallabag_core.import', ['alias' => 'pocket']) ; $this->process($container); From ce790c8f04ddc0ca8abfa737c80f556f900638be Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sat, 20 Jan 2024 10:25:27 +0100 Subject: [PATCH 36/38] Make sure tags targetEntity uses FQCN --- src/Wallabag/CoreBundle/Entity/Entry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 76199a95e..a14166e3e 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -295,7 +295,7 @@ class Entry private $user; /** - * @ORM\ManyToMany(targetEntity="Tag", inversedBy="entries", cascade={"persist"}) + * @ORM\ManyToMany(targetEntity="Wallabag\CoreBundle\Entity\Tag", inversedBy="entries", cascade={"persist"}) * @ORM\JoinTable( * name="entry_tag", * joinColumns={ From 764f547ba50dc246bdd339ad75e42e083e18e449 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 22 Jan 2024 10:29:35 +0100 Subject: [PATCH 37/38] Make reset database in tests use migrations instead of schema create --- tests/Wallabag/CoreBundle/WallabagCoreTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php b/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php index 20673c0e1..ce02791cc 100644 --- a/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php +++ b/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php @@ -52,7 +52,7 @@ abstract class WallabagCoreTestCase extends WebTestCase ]), new NullOutput()); $application->run(new ArrayInput([ - 'command' => 'doctrine:schema:create', + 'command' => 'doctrine:migrations:migrate', '--no-interaction' => true, '--env' => 'test', ]), new NullOutput()); From a7fe79dacd1a1a968ba556ce8962e33141665d35 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 22 Jan 2024 10:35:58 +0100 Subject: [PATCH 38/38] Make reset database drop full database --- tests/Wallabag/CoreBundle/WallabagCoreTestCase.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php b/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php index ce02791cc..dbe19ffe9 100644 --- a/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php +++ b/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php @@ -48,6 +48,7 @@ abstract class WallabagCoreTestCase extends WebTestCase 'command' => 'doctrine:schema:drop', '--no-interaction' => true, '--force' => true, + '--full-database' => true, '--env' => 'test', ]), new NullOutput());