diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-10-09 16:45:09 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-10-09 16:45:12 +0200 |
commit | f40c88eb1fa349aab600f9c1c94364f317fe62dd (patch) | |
tree | 4f57a7b2d5124541c4bc916a38d9dab262737db0 /src/Wallabag | |
parent | ed5e175c200501e2ee115ff5d8cd3f3ea47a1c2f (diff) | |
download | wallabag-f40c88eb1fa349aab600f9c1c94364f317fe62dd.tar.gz wallabag-f40c88eb1fa349aab600f9c1c94364f317fe62dd.tar.zst wallabag-f40c88eb1fa349aab600f9c1c94364f317fe62dd.zip |
Jump to Symfony 3.3 & update others deps
Also update tests urls
Diffstat (limited to 'src/Wallabag')
5 files changed, 13 insertions, 13 deletions
diff --git a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php index 8d7b6ee9..f3090e65 100644 --- a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php +++ b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php | |||
@@ -31,7 +31,7 @@ class WallabagAnnotationController extends FOSRestController | |||
31 | $total = count($annotationRows); | 31 | $total = count($annotationRows); |
32 | $annotations = ['total' => $total, 'rows' => $annotationRows]; | 32 | $annotations = ['total' => $total, 'rows' => $annotationRows]; |
33 | 33 | ||
34 | $json = $this->get('serializer')->serialize($annotations, 'json'); | 34 | $json = $this->get('jms_serializer')->serialize($annotations, 'json'); |
35 | 35 | ||
36 | return (new JsonResponse())->setJson($json); | 36 | return (new JsonResponse())->setJson($json); |
37 | } | 37 | } |
@@ -64,7 +64,7 @@ class WallabagAnnotationController extends FOSRestController | |||
64 | $em->persist($annotation); | 64 | $em->persist($annotation); |
65 | $em->flush(); | 65 | $em->flush(); |
66 | 66 | ||
67 | $json = $this->get('serializer')->serialize($annotation, 'json'); | 67 | $json = $this->get('jms_serializer')->serialize($annotation, 'json'); |
68 | 68 | ||
69 | return JsonResponse::fromJsonString($json); | 69 | return JsonResponse::fromJsonString($json); |
70 | } | 70 | } |
@@ -99,7 +99,7 @@ class WallabagAnnotationController extends FOSRestController | |||
99 | $em->persist($annotation); | 99 | $em->persist($annotation); |
100 | $em->flush(); | 100 | $em->flush(); |
101 | 101 | ||
102 | $json = $this->get('serializer')->serialize($annotation, 'json'); | 102 | $json = $this->get('jms_serializer')->serialize($annotation, 'json'); |
103 | 103 | ||
104 | return JsonResponse::fromJsonString($json); | 104 | return JsonResponse::fromJsonString($json); |
105 | } | 105 | } |
@@ -124,7 +124,7 @@ class WallabagAnnotationController extends FOSRestController | |||
124 | $em->remove($annotation); | 124 | $em->remove($annotation); |
125 | $em->flush(); | 125 | $em->flush(); |
126 | 126 | ||
127 | $json = $this->get('serializer')->serialize($annotation, 'json'); | 127 | $json = $this->get('jms_serializer')->serialize($annotation, 'json'); |
128 | 128 | ||
129 | return (new JsonResponse())->setJson($json); | 129 | return (new JsonResponse())->setJson($json); |
130 | } | 130 | } |
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index 6db97731..86e72335 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php | |||
@@ -752,7 +752,7 @@ class EntryRestController extends WallabagRestController | |||
752 | $context = new SerializationContext(); | 752 | $context = new SerializationContext(); |
753 | $context->setSerializeNull(true); | 753 | $context->setSerializeNull(true); |
754 | 754 | ||
755 | $json = $this->get('serializer')->serialize($data, 'json', $context); | 755 | $json = $this->get('jms_serializer')->serialize($data, 'json', $context); |
756 | 756 | ||
757 | return (new JsonResponse())->setJson($json); | 757 | return (new JsonResponse())->setJson($json); |
758 | } | 758 | } |
diff --git a/src/Wallabag/ApiBundle/Controller/TagRestController.php b/src/Wallabag/ApiBundle/Controller/TagRestController.php index efa4e8cf..d19f1228 100644 --- a/src/Wallabag/ApiBundle/Controller/TagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/TagRestController.php | |||
@@ -25,7 +25,7 @@ class TagRestController extends WallabagRestController | |||
25 | ->getRepository('WallabagCoreBundle:Tag') | 25 | ->getRepository('WallabagCoreBundle:Tag') |
26 | ->findAllTags($this->getUser()->getId()); | 26 | ->findAllTags($this->getUser()->getId()); |
27 | 27 | ||
28 | $json = $this->get('serializer')->serialize($tags, 'json'); | 28 | $json = $this->get('jms_serializer')->serialize($tags, 'json'); |
29 | 29 | ||
30 | return (new JsonResponse())->setJson($json); | 30 | return (new JsonResponse())->setJson($json); |
31 | } | 31 | } |
@@ -58,7 +58,7 @@ class TagRestController extends WallabagRestController | |||
58 | 58 | ||
59 | $this->cleanOrphanTag($tag); | 59 | $this->cleanOrphanTag($tag); |
60 | 60 | ||
61 | $json = $this->get('serializer')->serialize($tag, 'json'); | 61 | $json = $this->get('jms_serializer')->serialize($tag, 'json'); |
62 | 62 | ||
63 | return (new JsonResponse())->setJson($json); | 63 | return (new JsonResponse())->setJson($json); |
64 | } | 64 | } |
@@ -100,7 +100,7 @@ class TagRestController extends WallabagRestController | |||
100 | 100 | ||
101 | $this->cleanOrphanTag($tags); | 101 | $this->cleanOrphanTag($tags); |
102 | 102 | ||
103 | $json = $this->get('serializer')->serialize($tags, 'json'); | 103 | $json = $this->get('jms_serializer')->serialize($tags, 'json'); |
104 | 104 | ||
105 | return (new JsonResponse())->setJson($json); | 105 | return (new JsonResponse())->setJson($json); |
106 | } | 106 | } |
@@ -126,7 +126,7 @@ class TagRestController extends WallabagRestController | |||
126 | 126 | ||
127 | $this->cleanOrphanTag($tag); | 127 | $this->cleanOrphanTag($tag); |
128 | 128 | ||
129 | $json = $this->get('serializer')->serialize($tag, 'json'); | 129 | $json = $this->get('jms_serializer')->serialize($tag, 'json'); |
130 | 130 | ||
131 | return (new JsonResponse())->setJson($json); | 131 | return (new JsonResponse())->setJson($json); |
132 | } | 132 | } |
diff --git a/src/Wallabag/ApiBundle/Controller/UserRestController.php b/src/Wallabag/ApiBundle/Controller/UserRestController.php index 6f47cff0..a1378fc5 100644 --- a/src/Wallabag/ApiBundle/Controller/UserRestController.php +++ b/src/Wallabag/ApiBundle/Controller/UserRestController.php | |||
@@ -46,7 +46,7 @@ class UserRestController extends WallabagRestController | |||
46 | public function putUserAction(Request $request) | 46 | public function putUserAction(Request $request) |
47 | { | 47 | { |
48 | if (!$this->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) { | 48 | if (!$this->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) { |
49 | $json = $this->get('serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json'); | 49 | $json = $this->get('jms_serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json'); |
50 | 50 | ||
51 | return (new JsonResponse()) | 51 | return (new JsonResponse()) |
52 | ->setJson($json) | 52 | ->setJson($json) |
@@ -92,7 +92,7 @@ class UserRestController extends WallabagRestController | |||
92 | $errors['password'] = $this->translateErrors($data['plainPassword']['children']['first']['errors']); | 92 | $errors['password'] = $this->translateErrors($data['plainPassword']['children']['first']['errors']); |
93 | } | 93 | } |
94 | 94 | ||
95 | $json = $this->get('serializer')->serialize(['error' => $errors], 'json'); | 95 | $json = $this->get('jms_serializer')->serialize(['error' => $errors], 'json'); |
96 | 96 | ||
97 | return (new JsonResponse()) | 97 | return (new JsonResponse()) |
98 | ->setJson($json) | 98 | ->setJson($json) |
@@ -127,7 +127,7 @@ class UserRestController extends WallabagRestController | |||
127 | */ | 127 | */ |
128 | private function sendUser(User $user, $group = 'user_api', $status = JsonResponse::HTTP_OK) | 128 | private function sendUser(User $user, $group = 'user_api', $status = JsonResponse::HTTP_OK) |
129 | { | 129 | { |
130 | $json = $this->get('serializer')->serialize( | 130 | $json = $this->get('jms_serializer')->serialize( |
131 | $user, | 131 | $user, |
132 | 'json', | 132 | 'json', |
133 | SerializationContext::create()->setGroups([$group]) | 133 | SerializationContext::create()->setGroups([$group]) |
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index 71da2a64..7d8cfbba 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php | |||
@@ -19,7 +19,7 @@ class WallabagRestController extends FOSRestController | |||
19 | public function getVersionAction() | 19 | public function getVersionAction() |
20 | { | 20 | { |
21 | $version = $this->container->getParameter('wallabag_core.version'); | 21 | $version = $this->container->getParameter('wallabag_core.version'); |
22 | $json = $this->get('serializer')->serialize($version, 'json'); | 22 | $json = $this->get('jms_serializer')->serialize($version, 'json'); |
23 | 23 | ||
24 | return (new JsonResponse())->setJson($json); | 24 | return (new JsonResponse())->setJson($json); |
25 | } | 25 | } |