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
Member

@zsilbi zsilbi commented May 22, 2019

Hello!

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

@zsilbi zsilbi changed the title Updated Model\Manager getRelation() functions Updated Model\Manager relations getter functions May 22, 2019
@niden niden added breaks bc Functionality that breaks Backwards Compatibility Bug - Medium documentation Documentation required labels May 22, 2019
@niden
Copy link
Member

niden commented May 22, 2019

Thank you @zsilbi

@niden niden merged commit 1ac155f into phalcon:4.0.x May 22, 2019
@zsilbi zsilbi deleted the models-manager-functions-parameters branch May 22, 2019 14:17
@niden niden added the 4.0 label Dec 2, 2019
@niden niden removed the documentation Documentation required label Dec 15, 2019
@niden niden added bug A bug report status: medium Medium and removed Bug - Medium labels Dec 23, 2019
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 bug A bug report status: medium Medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants