Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0.x] Pagination supports optional aliases and Phalcon\Mvc\Model\Query\Builder supports bind params #13653

Merged
merged 8 commits into from Dec 12, 2018

Conversation

CameronHall
Copy link
Contributor

Hello!

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the Contributing Guidelines?
  • I have checked that another pull request for this purpose does not exist.
  • I wrote some tests for this PR.

Small description of change:

  • Added Phalcon\Paginator\RepositoryInterface for repository the current state of paginator and also optional sets the aliases for properties repository.
  • Added bind support to Phalcon\Mvc\Model\Query\Builder. The Query Builder has the same methods as Phalcon\Mvc\Model\Query; getBindParams, setBindParams, getBindTypes and setBindTypes. #13368

It is worth noting I made a few changes between the original PR #10985 and this one. I've updated all the property names to what they were changes to in #13492. I also turfed the totalPages property as it was made redundant by the pre-existing property last.

All of the pagination adapter constructors received a spring clean as well.

Thanks

phalcon/paginator/adapter/querybuilder.zep Outdated Show resolved Hide resolved
tests/integration/Paginator/Adapter/QueryBuilderCest.php Outdated Show resolved Hide resolved
@@ -0,0 +1,70 @@
<?php
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to refactor this a bit after we add it to the main repo. I will generate test stubs to split all the methods and make tests shorter. a todo for later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. In future, would you rather we generate the stubs when adding new classes? If so, how do we do that?

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are generated with zephir stubs

@niden
Copy link
Sponsor Member

niden commented Dec 11, 2018

Looking good!

@CameronHall
Copy link
Contributor Author

@niden changes have been made as requested :)

@niden niden added this to In progress in 4.0.0 Release via automation Dec 12, 2018
@niden niden merged commit 16b0d0a into phalcon:4.0.x Dec 12, 2018
4.0.0 Release automation moved this from In progress to Done Dec 12, 2018
@niden
Copy link
Sponsor Member

niden commented Dec 12, 2018

@CameronHall Thank you!

@@ -54,3 +54,5 @@ php_test_results_*.txt
docker-compose.yml
build/gccarch
tests/_cache
.zephir/
.temp/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CameronHall Zephir >= 0.11 uses .zephir and Zephir < 0.11 .temp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sergeyklay I'll remove .temp in the next PR.

@sergeyklay sergeyklay added the breaks bc Functionality that breaks Backwards Compatibility label Dec 12, 2018
@niden niden added the documentation Documentation required label Apr 9, 2019
@niden niden added 4.0 new feature request Planned Feature or New Feature Request and removed documentation Documentation required labels Oct 13, 2019
@CameronHall CameronHall deleted the feature/paginator-repository branch October 24, 2019 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaks bc Functionality that breaks Backwards Compatibility new feature request Planned Feature or New Feature Request
Projects
No open projects
4.0.0 Release
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants