serialize_null: true
format_listener:
rules:
- - { path: '^/', priorities: ['json'], fallback_format: 'json' }
+ - { path: '^/api', priorities: ['json'], fallback_format: 'json' }
param_fetcher_listener: force
+ routing_loader:
+ include_format: false
versioning:
enabled: true
resolvers:
regex: '/(v|version)=(?P<version>[0-9\.]+)/'
sensio_framework_extra:
- view: { annotations: false }
request: { converters: true }
public function removePersonAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
- $person = $em->getRepository('App::Person')->find($request->get('id'));
+ $person = $em->getRepository('App:Person')->find($request->get('id'));
if (!empty($person)) {
$em->remove($person);
public function updatePersonAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
- $person = $em->getRepository('App::Person')->find($request->get('id'));
+ $person = $em->getRepository('App:Person')->find($request->get('id'));
if (empty($person)) {
return new JsonResponse(['message' => 'Person not found'], Response::HTTP_NOT_FOUND);
public function showPersonByEmail(Request $request)
{
$em = $this->getDoctrine()->getManager();
- $person = $em->getRepository('App::Person')->find($request->get('email'));
+ $person = $em->getRepository('App:Person')->find($request->get('email'));
if (empty($person)) {
return new JsonResponse(['message' => 'Person not found'], Response::HTTP_NOT_FOUND);
public function showPersonFriendsByEmail(Request $request)
{
$em = $this->getDoctrine()->getManager();
- $person = $em->getRepository('App::Person')->find($request->get('email'));
+ $person = $em->getRepository('App:Person')->find($request->get('email'));
if (empty($person)) {
return new JsonResponse(['message' => 'Person not found'], Response::HTTP_NOT_FOUND);