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

Updated Model\Manager relations getter functions #14115

Merged
merged 9 commits into from May 22, 2019

Conversation

@zsilbi
Copy link
Contributor

commented May 22, 2019

Hello!

  • Type: bug fix and code quality
  • Link to issue: #11504

In raising this pull request, I confirm the following:

  • 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
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

Small description of change:

In Phalcon\Mvc\Model\Manager::getRelationRecords() function, $method parameter is not always string. (most of the time it's null)
It's optional and rarely ever used so I think it should be the last parameter. (This Breaks BC)

Same applies to:

  • Phalcon\Mvc\Model\Manager::getBelongsToRecords()
  • Phalcon\Mvc\Model\Manager::getHasOneRecords()
  • Phalcon\Mvc\Model\Manager::getHasManyRecords()

Modified the interfaces and usage everywhere accordingly.

Made some minor changes inside Phalcon\Mvc\Model\Manager::getRelationRecords().
Added tests for Phalcon\Mvc\Model\Manager::getRelationRecords(), also for issue: #11504

Thanks,
zsilbi

Németh Balázs added some commits May 22, 2019

@zsilbi zsilbi changed the title Updated Model\Manager getRelation() functions Updated Model\Manager relations getter functions May 22, 2019

@niden

This comment has been minimized.

Copy link
Member

commented May 22, 2019

Thank you @zsilbi

@niden

niden approved these changes May 22, 2019

@niden niden merged commit 1ac155f into phalcon:4.0.x May 22, 2019

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zsilbi zsilbi deleted the zsilbi:models-manager-functions-parameters branch May 22, 2019

@niden niden added this to In progress in 4.0 Release via automation May 22, 2019

@niden niden moved this from In progress to Done in 4.0 Release May 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants
You can’t perform that action at this time.