zend-paginator icon indicating copy to clipboard operation
zend-paginator copied to clipboard

Prevent colliding internal cache ids based on adapter

Open richard-parnaby-king opened this issue 7 years ago • 2 comments

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.

richard-parnaby-king avatar Nov 28 '17 16:11 richard-parnaby-king

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.

weierophinney avatar Dec 31 '19 22:12 weierophinney

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.

weierophinney avatar Dec 31 '19 22:12 weierophinney