Move Api controllers to Core

This commit is contained in:
Yassine Guedidi 2023-12-31 09:28:37 +01:00
parent 020c616c9d
commit 3fc0b5fa5b
21 changed files with 22 additions and 41 deletions

View file

@ -3,11 +3,6 @@ wallabag_import:
type: annotation
prefix: /import
wallabag_api:
resource: "@WallabagApiBundle/Controller/"
type: annotation
prefix: /
app:
resource: "@WallabagCoreBundle/Controller/"
type: annotation

View file

@ -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']

View file

@ -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"})
*

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ApiBundle\Controller;
namespace Wallabag\CoreBundle\Controller\Api;
use Nelmio\ApiDocBundle\Annotation\Operation;
use OpenApi\Annotations as OA;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ApiBundle\Controller;
namespace Wallabag\CoreBundle\Controller\Api;
use JMS\Serializer\SerializationContext;
use JMS\Serializer\SerializerInterface;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ApiBundle\Controller;
namespace Wallabag\CoreBundle\Controller\Api;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ApiBundle\Controller;
namespace Wallabag\CoreBundle\Controller\Api;
use Hateoas\Configuration\Route as HateoasRoute;
use Hateoas\Representation\Factory\PagerfantaFactory;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ApiBundle\Controller;
namespace Wallabag\CoreBundle\Controller\Api;
use Hateoas\Configuration\Route as HateoasRoute;
use Hateoas\Representation\Factory\PagerfantaFactory;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ApiBundle\Controller;
namespace Wallabag\CoreBundle\Controller\Api;
use Nelmio\ApiDocBundle\Annotation\Operation;
use OpenApi\Annotations as OA;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ApiBundle\Controller;
namespace Wallabag\CoreBundle\Controller\Api;
use JMS\Serializer\SerializationContext;
use JMS\Serializer\SerializerBuilder;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ApiBundle\Controller;
namespace Wallabag\CoreBundle\Controller\Api;
use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ApiBundle\Controller;
namespace Wallabag\CoreBundle\Controller\Api;
use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface;

View file

@ -1,8 +1,6 @@
<?php
namespace Tests\Wallabag\ApiBundle\Controller;
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
namespace Tests\Wallabag\CoreBundle\Controller\Api;
class ConfigRestControllerTest extends WallabagApiTestCase
{

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Wallabag\ApiBundle\Controller;
namespace Tests\Wallabag\CoreBundle\Controller\Api;
use Doctrine\ORM\EntityManagerInterface;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;

View file

@ -1,10 +1,9 @@
<?php
namespace Tests\Wallabag\ApiBundle\Controller;
namespace Tests\Wallabag\CoreBundle\Controller\Api;
use Doctrine\ORM\EntityManagerInterface;
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;

View file

@ -1,8 +1,6 @@
<?php
namespace Tests\Wallabag\ApiBundle\Controller;
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
namespace Tests\Wallabag\CoreBundle\Controller\Api;
class SearchRestControllerTest extends WallabagApiTestCase
{

View file

@ -1,9 +1,8 @@
<?php
namespace Tests\Wallabag\ApiBundle\Controller;
namespace Tests\Wallabag\CoreBundle\Controller\Api;
use Doctrine\ORM\EntityManagerInterface;
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag;

View file

@ -1,8 +1,6 @@
<?php
namespace Tests\Wallabag\ApiBundle\Controller;
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
namespace Tests\Wallabag\CoreBundle\Controller\Api;
class TaggingRuleRestControllerTest extends WallabagApiTestCase
{

View file

@ -1,9 +1,8 @@
<?php
namespace Tests\Wallabag\ApiBundle\Controller;
namespace Tests\Wallabag\CoreBundle\Controller\Api;
use Craue\ConfigBundle\Util\Config;
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
class UserRestControllerTest extends WallabagApiTestCase
{

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Wallabag\ApiBundle;
namespace Tests\Wallabag\CoreBundle\Controller\Api;
use Doctrine\ORM\EntityManagerInterface;
use FOS\UserBundle\Model\UserInterface;

View file

@ -1,9 +1,8 @@
<?php
namespace Tests\Wallabag\ApiBundle\Controller;
namespace Tests\Wallabag\CoreBundle\Controller\Api;
use Craue\ConfigBundle\Util\Config;
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
class WallabagRestControllerTest extends WallabagApiTestCase
{