zend-paginator
zend-paginator copied to clipboard
Prevent colliding internal cache ids based on adapter
Resolves #41
json_encode($this->getAdapter())
would always return an empty object for \Zend\Paginator\Adapter\DbSelect
adapters (i.e. {}
). By performing print_r
on the adapter we can get the current state which, in the case of DbSelect
, includes an sql object containing table name, join details, where clause, etc.
This change will prevent collisions between adapters that do not have any public properties and/or values.
This repository has been closed and moved to laminas/laminas-paginator; a new issue has been opened at https://github.com/laminas/laminas-paginator/issues/2.
This repository has been moved to laminas/laminas-paginator. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:
- Squash all commits in your branch (
git rebase -i origin/{branch}
) - Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
- Run the laminas/laminas-migration tool on the code.
- Clone laminas/laminas-paginator to another directory.
- Copy the files from the second bullet point to the clone of laminas/laminas-paginator.
- In your clone of laminas/laminas-paginator, commit the files, push to your fork, and open the new PR. We will be providing tooling via laminas/laminas-migration soon to help automate the process.