Skip to content

Commit

Permalink
Merge pull request #6 from jfalbel/patch-1
Browse files Browse the repository at this point in the history
The _serialize special view variables of JsonView are now deprecated
  • Loading branch information
bcrowe authored Feb 10, 2021
2 parents 8a2d786 + a875719 commit 9df343a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controller/Component/ApiPaginationComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public function beforeRender(Event $event)
}

$subject->set($config['key'], $this->pagingInfo);
$data = $subject->viewBuilder()->getVar('_serialize') ?? [];
$data = $subject->viewBuilder()->getOption('serialize') ?? [];
$data[] = $config['key'];
$subject->set('_serialize', $data);
$subject->viewBuilder()->setOption('serialize', $data);
}

/**
Expand Down

0 comments on commit 9df343a

Please sign in to comment.