1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Jump to Symfony 3.3 & update others deps

Also update tests urls
This commit is contained in:
Jeremy Benoist 2017-10-09 16:45:09 +02:00
parent ed5e175c20
commit f40c88eb1f
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
18 changed files with 52 additions and 30 deletions

View file

@ -31,7 +31,7 @@ class WallabagAnnotationController extends FOSRestController
$total = count($annotationRows);
$annotations = ['total' => $total, 'rows' => $annotationRows];
$json = $this->get('serializer')->serialize($annotations, 'json');
$json = $this->get('jms_serializer')->serialize($annotations, 'json');
return (new JsonResponse())->setJson($json);
}
@ -64,7 +64,7 @@ class WallabagAnnotationController extends FOSRestController
$em->persist($annotation);
$em->flush();
$json = $this->get('serializer')->serialize($annotation, 'json');
$json = $this->get('jms_serializer')->serialize($annotation, 'json');
return JsonResponse::fromJsonString($json);
}
@ -99,7 +99,7 @@ class WallabagAnnotationController extends FOSRestController
$em->persist($annotation);
$em->flush();
$json = $this->get('serializer')->serialize($annotation, 'json');
$json = $this->get('jms_serializer')->serialize($annotation, 'json');
return JsonResponse::fromJsonString($json);
}
@ -124,7 +124,7 @@ class WallabagAnnotationController extends FOSRestController
$em->remove($annotation);
$em->flush();
$json = $this->get('serializer')->serialize($annotation, 'json');
$json = $this->get('jms_serializer')->serialize($annotation, 'json');
return (new JsonResponse())->setJson($json);
}

View file

@ -752,7 +752,7 @@ class EntryRestController extends WallabagRestController
$context = new SerializationContext();
$context->setSerializeNull(true);
$json = $this->get('serializer')->serialize($data, 'json', $context);
$json = $this->get('jms_serializer')->serialize($data, 'json', $context);
return (new JsonResponse())->setJson($json);
}

View file

@ -25,7 +25,7 @@ class TagRestController extends WallabagRestController
->getRepository('WallabagCoreBundle:Tag')
->findAllTags($this->getUser()->getId());
$json = $this->get('serializer')->serialize($tags, 'json');
$json = $this->get('jms_serializer')->serialize($tags, 'json');
return (new JsonResponse())->setJson($json);
}
@ -58,7 +58,7 @@ class TagRestController extends WallabagRestController
$this->cleanOrphanTag($tag);
$json = $this->get('serializer')->serialize($tag, 'json');
$json = $this->get('jms_serializer')->serialize($tag, 'json');
return (new JsonResponse())->setJson($json);
}
@ -100,7 +100,7 @@ class TagRestController extends WallabagRestController
$this->cleanOrphanTag($tags);
$json = $this->get('serializer')->serialize($tags, 'json');
$json = $this->get('jms_serializer')->serialize($tags, 'json');
return (new JsonResponse())->setJson($json);
}
@ -126,7 +126,7 @@ class TagRestController extends WallabagRestController
$this->cleanOrphanTag($tag);
$json = $this->get('serializer')->serialize($tag, 'json');
$json = $this->get('jms_serializer')->serialize($tag, 'json');
return (new JsonResponse())->setJson($json);
}

View file

@ -46,7 +46,7 @@ class UserRestController extends WallabagRestController
public function putUserAction(Request $request)
{
if (!$this->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) {
$json = $this->get('serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json');
$json = $this->get('jms_serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json');
return (new JsonResponse())
->setJson($json)
@ -92,7 +92,7 @@ class UserRestController extends WallabagRestController
$errors['password'] = $this->translateErrors($data['plainPassword']['children']['first']['errors']);
}
$json = $this->get('serializer')->serialize(['error' => $errors], 'json');
$json = $this->get('jms_serializer')->serialize(['error' => $errors], 'json');
return (new JsonResponse())
->setJson($json)
@ -127,7 +127,7 @@ class UserRestController extends WallabagRestController
*/
private function sendUser(User $user, $group = 'user_api', $status = JsonResponse::HTTP_OK)
{
$json = $this->get('serializer')->serialize(
$json = $this->get('jms_serializer')->serialize(
$user,
'json',
SerializationContext::create()->setGroups([$group])

View file

@ -19,7 +19,7 @@ class WallabagRestController extends FOSRestController
public function getVersionAction()
{
$version = $this->container->getParameter('wallabag_core.version');
$json = $this->get('serializer')->serialize($version, 'json');
$json = $this->get('jms_serializer')->serialize($version, 'json');
return (new JsonResponse())->setJson($json);
}