mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-27 17:28:39 +00:00
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
This commit is contained in:
parent
2b6380f5ac
commit
115de64e5b
34 changed files with 132 additions and 62 deletions
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace Wallabag\ApiBundle\Controller;
|
||||
|
||||
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\ApiBundle\Entity\Client;
|
||||
use Wallabag\ApiBundle\Form\Type\ClientType;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Controller;
|
||||
|
||||
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 Wallabag\ImportBundle\Form\Type\UploadImportType;
|
||||
|
||||
abstract class BrowserController extends Controller
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Controller;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class ChromeController extends BrowserController
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Controller;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class FirefoxController extends BrowserController
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Controller;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class ImportController extends Controller
|
||||
{
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Controller;
|
||||
|
||||
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\ImportBundle\Form\Type\UploadImportType;
|
||||
|
||||
class InstapaperController extends Controller
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Controller;
|
||||
|
||||
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\ImportBundle\Form\Type\UploadImportType;
|
||||
|
||||
class PinboardController extends Controller
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Controller;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
|
||||
class PocketController extends Controller
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Controller;
|
||||
|
||||
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\ImportBundle\Form\Type\UploadImportType;
|
||||
|
||||
class ReadabilityController extends Controller
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Controller;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class WallabagV1Controller extends WallabagController
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Wallabag\ImportBundle\Controller;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class WallabagV2Controller extends WallabagController
|
||||
{
|
||||
|
|
|
@ -112,3 +112,11 @@ services:
|
|||
- [ setLogger, [ "@logger" ]]
|
||||
tags:
|
||||
- { name: wallabag_import.import, alias: chrome }
|
||||
|
||||
wallabag_import.command.import:
|
||||
class: Wallabag\ImportBundle\Command\ImportCommand
|
||||
tags: ['console.command']
|
||||
|
||||
wallabag_import.command.redis_worker:
|
||||
class: Wallabag\ImportBundle\Command\RedisWorkerCommand
|
||||
tags: ['console.command']
|
||||
|
|
|
@ -7,10 +7,9 @@ use FOS\UserBundle\FOSUserEvents;
|
|||
use Pagerfanta\Adapter\DoctrineORMAdapter;
|
||||
use Pagerfanta\Exception\OutOfRangeCurrentPageException;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
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\UserBundle\Entity\User;
|
||||
use Wallabag\UserBundle\Form\SearchUserType;
|
||||
|
||||
|
@ -22,8 +21,7 @@ class ManageController extends Controller
|
|||
/**
|
||||
* Creates a new User entity.
|
||||
*
|
||||
* @Route("/new", name="user_new")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/new", name="user_new", methods={"GET", "POST"})
|
||||
*/
|
||||
public function newAction(Request $request)
|
||||
{
|
||||
|
@ -60,8 +58,7 @@ class ManageController extends Controller
|
|||
/**
|
||||
* Displays a form to edit an existing User entity.
|
||||
*
|
||||
* @Route("/{id}/edit", name="user_edit")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/{id}/edit", name="user_edit", methods={"GET", "POST"})
|
||||
*/
|
||||
public function editAction(Request $request, User $user)
|
||||
{
|
||||
|
@ -93,8 +90,7 @@ class ManageController extends Controller
|
|||
/**
|
||||
* Deletes a User entity.
|
||||
*
|
||||
* @Route("/{id}", name="user_delete")
|
||||
* @Method("DELETE")
|
||||
* @Route("/{id}", name="user_delete", methods={"DELETE"})
|
||||
*/
|
||||
public function deleteAction(Request $request, User $user)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue