forked from wallabag/wallabag
Jump to Symfony 3.3 & update others deps
Also update tests urls
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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])
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user