aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-01-15 15:38:31 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-01-15 15:38:31 +0100
commit1930c19d8214c05ceefac5ac011a6b6e7e4a983d (patch)
tree8f07ffa139c7c2e883a560ef7dbb35a76adfb8dd /src/Wallabag/ApiBundle
parent790573d45899504bdecd2573c8f64018e23b139e (diff)
parent131eaa3e94ace8d75d6218e5c7c3aa58d5bb5009 (diff)
downloadwallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.gz
wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.zst
wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.zip
Merge pull request #1524 from wallabag/sf2.8
Upgrade to Symfony 3.0
Diffstat (limited to 'src/Wallabag/ApiBundle')
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php7
-rw-r--r--src/Wallabag/ApiBundle/Entity/AccessToken.php2
-rw-r--r--src/Wallabag/ApiBundle/Entity/AuthCode.php2
-rw-r--r--src/Wallabag/ApiBundle/Entity/Client.php2
-rw-r--r--src/Wallabag/ApiBundle/Entity/RefreshToken.php2
5 files changed, 8 insertions, 7 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 354a6f8e..d9035cac 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -3,13 +3,14 @@
3namespace Wallabag\ApiBundle\Controller; 3namespace Wallabag\ApiBundle\Controller;
4 4
5use FOS\RestBundle\Controller\FOSRestController; 5use FOS\RestBundle\Controller\FOSRestController;
6use Hateoas\Configuration\Route;
7use Hateoas\Representation\Factory\PagerfantaFactory;
6use Nelmio\ApiDocBundle\Annotation\ApiDoc; 8use Nelmio\ApiDocBundle\Annotation\ApiDoc;
7use Symfony\Component\HttpFoundation\Request; 9use Symfony\Component\HttpFoundation\Request;
8use Symfony\Component\HttpFoundation\Response; 10use Symfony\Component\HttpFoundation\Response;
11use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
9use Wallabag\CoreBundle\Entity\Entry; 12use Wallabag\CoreBundle\Entity\Entry;
10use Wallabag\CoreBundle\Entity\Tag; 13use Wallabag\CoreBundle\Entity\Tag;
11use Hateoas\Configuration\Route;
12use Hateoas\Representation\Factory\PagerfantaFactory;
13 14
14class WallabagRestController extends FOSRestController 15class WallabagRestController extends FOSRestController
15{ 16{
@@ -84,7 +85,7 @@ class WallabagRestController extends FOSRestController
84 $pagerfantaFactory = new PagerfantaFactory('page', 'perPage'); 85 $pagerfantaFactory = new PagerfantaFactory('page', 'perPage');
85 $paginatedCollection = $pagerfantaFactory->createRepresentation( 86 $paginatedCollection = $pagerfantaFactory->createRepresentation(
86 $pager, 87 $pager,
87 new Route('api_get_entries', [], $absolute = true) 88 new Route('api_get_entries', [], UrlGeneratorInterface::ABSOLUTE_URL)
88 ); 89 );
89 90
90 $json = $this->get('serializer')->serialize($paginatedCollection, 'json'); 91 $json = $this->get('serializer')->serialize($paginatedCollection, 'json');
diff --git a/src/Wallabag/ApiBundle/Entity/AccessToken.php b/src/Wallabag/ApiBundle/Entity/AccessToken.php
index b1f4e7de..2ff63a83 100644
--- a/src/Wallabag/ApiBundle/Entity/AccessToken.php
+++ b/src/Wallabag/ApiBundle/Entity/AccessToken.php
@@ -2,8 +2,8 @@
2 2
3namespace Wallabag\ApiBundle\Entity; 3namespace Wallabag\ApiBundle\Entity;
4 4
5use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken;
6use Doctrine\ORM\Mapping as ORM; 5use Doctrine\ORM\Mapping as ORM;
6use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken;
7 7
8/** 8/**
9 * @ORM\Table("oauth2_access_tokens") 9 * @ORM\Table("oauth2_access_tokens")
diff --git a/src/Wallabag/ApiBundle/Entity/AuthCode.php b/src/Wallabag/ApiBundle/Entity/AuthCode.php
index 81398158..4d4b09fe 100644
--- a/src/Wallabag/ApiBundle/Entity/AuthCode.php
+++ b/src/Wallabag/ApiBundle/Entity/AuthCode.php
@@ -2,8 +2,8 @@
2 2
3namespace Wallabag\ApiBundle\Entity; 3namespace Wallabag\ApiBundle\Entity;
4 4
5use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
6use Doctrine\ORM\Mapping as ORM; 5use Doctrine\ORM\Mapping as ORM;
6use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
7 7
8/** 8/**
9 * @ORM\Table("oauth2_auth_codes") 9 * @ORM\Table("oauth2_auth_codes")
diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php
index d449870a..c04ed0f6 100644
--- a/src/Wallabag/ApiBundle/Entity/Client.php
+++ b/src/Wallabag/ApiBundle/Entity/Client.php
@@ -2,8 +2,8 @@
2 2
3namespace Wallabag\ApiBundle\Entity; 3namespace Wallabag\ApiBundle\Entity;
4 4
5use FOS\OAuthServerBundle\Entity\Client as BaseClient;
6use Doctrine\ORM\Mapping as ORM; 5use Doctrine\ORM\Mapping as ORM;
6use FOS\OAuthServerBundle\Entity\Client as BaseClient;
7 7
8/** 8/**
9 * @ORM\Table("oauth2_clients") 9 * @ORM\Table("oauth2_clients")
diff --git a/src/Wallabag/ApiBundle/Entity/RefreshToken.php b/src/Wallabag/ApiBundle/Entity/RefreshToken.php
index be2c1d2e..6d0cab68 100644
--- a/src/Wallabag/ApiBundle/Entity/RefreshToken.php
+++ b/src/Wallabag/ApiBundle/Entity/RefreshToken.php
@@ -2,8 +2,8 @@
2 2
3namespace Wallabag\ApiBundle\Entity; 3namespace Wallabag\ApiBundle\Entity;
4 4
5use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken;
6use Doctrine\ORM\Mapping as ORM; 5use Doctrine\ORM\Mapping as ORM;
6use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken;
7 7
8/** 8/**
9 * @ORM\Table("oauth2_refresh_tokens") 9 * @ORM\Table("oauth2_refresh_tokens")