From 115de64e5bb9d7f9151ecf15e15a0d988563528e Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 4 Oct 2018 14:07:20 +0200 Subject: Jump to Symfony 3.4 Thanks to the BC compatibility, almost nothing have to be changed. All changes are related to new bundle version of: - SensioFrameworkExtraBundle - DoctrineFixturesBundle --- .../CoreBundle/Controller/ConfigController.php | 2 +- .../CoreBundle/Controller/EntryController.php | 2 +- .../CoreBundle/Controller/ExportController.php | 2 +- .../CoreBundle/Controller/RssController.php | 2 +- .../Controller/SiteCredentialController.php | 15 ++++------- .../CoreBundle/Controller/StaticController.php | 2 +- .../CoreBundle/Controller/TagController.php | 2 +- .../CoreBundle/Resources/config/services.yml | 29 ++++++++++++++++++++++ 8 files changed, 40 insertions(+), 16 deletions(-) (limited to 'src/Wallabag/CoreBundle') diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index b999c539..242f557f 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -2,12 +2,12 @@ namespace Wallabag\CoreBundle\Controller; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; +use Symfony\Component\Routing\Annotation\Route; use Wallabag\CoreBundle\Entity\Config; use Wallabag\CoreBundle\Entity\TaggingRule; use Wallabag\CoreBundle\Form\Type\ChangePasswordType; diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 29400833..ac372a33 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -5,9 +5,9 @@ namespace Wallabag\CoreBundle\Controller; use Pagerfanta\Adapter\DoctrineORMAdapter; use Pagerfanta\Exception\OutOfRangeCurrentPageException; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Event\EntryDeletedEvent; diff --git a/src/Wallabag/CoreBundle/Controller/ExportController.php b/src/Wallabag/CoreBundle/Controller/ExportController.php index 7ca89239..0d2b15c5 100644 --- a/src/Wallabag/CoreBundle/Controller/ExportController.php +++ b/src/Wallabag/CoreBundle/Controller/ExportController.php @@ -2,10 +2,10 @@ namespace Wallabag\CoreBundle\Controller; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\Routing\Annotation\Route; use Wallabag\CoreBundle\Entity\Entry; /** diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php index 848bb814..1c831c03 100644 --- a/src/Wallabag/CoreBundle/Controller/RssController.php +++ b/src/Wallabag/CoreBundle/Controller/RssController.php @@ -7,10 +7,10 @@ use Pagerfanta\Adapter\DoctrineORMAdapter; use Pagerfanta\Exception\OutOfRangeCurrentPageException; use Pagerfanta\Pagerfanta; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Wallabag\CoreBundle\Entity\Tag; use Wallabag\UserBundle\Entity\User; diff --git a/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php b/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php index 548de744..51bc1d94 100644 --- a/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php +++ b/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php @@ -2,10 +2,9 @@ namespace Wallabag\CoreBundle\Controller; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Annotation\Route; use Wallabag\CoreBundle\Entity\SiteCredential; use Wallabag\UserBundle\Entity\User; @@ -19,8 +18,7 @@ class SiteCredentialController extends Controller /** * Lists all User entities. * - * @Route("/", name="site_credentials_index") - * @Method("GET") + * @Route("/", name="site_credentials_index", methods={"GET"}) */ public function indexAction() { @@ -36,8 +34,7 @@ class SiteCredentialController extends Controller /** * Creates a new site credential entity. * - * @Route("/new", name="site_credentials_new") - * @Method({"GET", "POST"}) + * @Route("/new", name="site_credentials_new", methods={"GET", "POST"}) * * @param Request $request * @@ -77,8 +74,7 @@ class SiteCredentialController extends Controller /** * Displays a form to edit an existing site credential entity. * - * @Route("/{id}/edit", name="site_credentials_edit") - * @Method({"GET", "POST"}) + * @Route("/{id}/edit", name="site_credentials_edit", methods={"GET", "POST"}) * * @param Request $request * @param SiteCredential $siteCredential @@ -121,8 +117,7 @@ class SiteCredentialController extends Controller /** * Deletes a site credential entity. * - * @Route("/{id}", name="site_credentials_delete") - * @Method("DELETE") + * @Route("/{id}", name="site_credentials_delete", methods={"DELETE"}) * * @param Request $request * @param SiteCredential $siteCredential diff --git a/src/Wallabag/CoreBundle/Controller/StaticController.php b/src/Wallabag/CoreBundle/Controller/StaticController.php index 318af303..fa760c14 100644 --- a/src/Wallabag/CoreBundle/Controller/StaticController.php +++ b/src/Wallabag/CoreBundle/Controller/StaticController.php @@ -2,8 +2,8 @@ namespace Wallabag\CoreBundle\Controller; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Component\Routing\Annotation\Route; class StaticController extends Controller { diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index b6d28e59..15f06ff5 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php @@ -5,9 +5,9 @@ namespace Wallabag\CoreBundle\Controller; use Pagerfanta\Adapter\ArrayAdapter; use Pagerfanta\Exception\OutOfRangeCurrentPageException; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Annotation\Route; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Tag; use Wallabag\CoreBundle\Form\Type\NewTagType; diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 85306276..a27dd210 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -181,6 +181,7 @@ services: wallabag_core.exception_controller: class: Wallabag\CoreBundle\Controller\ExceptionController + public: true arguments: - '@twig' - '%kernel.debug%' @@ -218,3 +219,31 @@ services: arguments: - "%wallabag_core.site_credentials.encryption_key_path%" - "@logger" + + wallabag_core.command.clean_duplicates: + class: Wallabag\CoreBundle\Command\CleanDuplicatesCommand + tags: ['console.command'] + + wallabag_core.command.export: + class: Wallabag\CoreBundle\Command\ExportCommand + tags: ['console.command'] + + wallabag_core.command.install: + class: Wallabag\CoreBundle\Command\InstallCommand + tags: ['console.command'] + + wallabag_core.command.list_user: + class: Wallabag\CoreBundle\Command\ListUserCommand + tags: ['console.command'] + + wallabag_core.command.reload_entry: + class: Wallabag\CoreBundle\Command\ReloadEntryCommand + tags: ['console.command'] + + wallabag_core.command.show_user: + class: Wallabag\CoreBundle\Command\ShowUserCommand + tags: ['console.command'] + + wallabag_core.command.tag_all: + class: Wallabag\CoreBundle\Command\TagAllCommand + tags: ['console.command'] -- cgit v1.2.3