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

[BUG]: Different types for Query\BuilderInterface::orderBy() and Query\Builder::orderBy(). #15415

Closed
StudioMaX opened this issue Apr 20, 2021 · 1 comment · Fixed by #15416
Closed
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release breaks bc Functionality that breaks Backwards Compatibility bug A bug report status: high High

Comments

@StudioMaX
Copy link
Contributor

Describe the bug
Different types are specified for the Phalcon\Mvc\Model\Query\Builder::orderBy() and Phalcon\Mvc\Model\Query\BuilderInterface::orderBy()

To Reproduce

* $builder->orderBy("Robots.name");
* $builder->orderBy(["1", "Robots.name"]);
* $builder->orderBy(["Robots.name DESC"]);
*```
*
* @param string|array orderBy
*/
public function orderBy(var orderBy) -> <BuilderInterface>

public function orderBy(string orderBy) -> <BuilderInterface>;

Expected behavior
Most likely an error in the interface, since the type allows arrays.
Probably this is also must be fixed in 5.x.

Details

  • Phalcon version: v5.0.0-alpha.1
  • PHP Version: -
  • Operating System: -
  • Installation type: -
  • Zephir version (if any): -
  • Server: -
  • Other related info (Database, table schema): -
@StudioMaX StudioMaX added bug A bug report status: unverified Unverified labels Apr 20, 2021
@niden niden added 5.0 The issues we want to solve in the 5.0 release status: high High and removed status: unverified Unverified labels Apr 20, 2021
@niden niden self-assigned this Apr 20, 2021
@niden niden mentioned this issue Apr 20, 2021
5 tasks
@niden niden linked a pull request Apr 20, 2021 that will close this issue
5 tasks
@niden niden added the breaks bc Functionality that breaks Backwards Compatibility label Apr 20, 2021
@niden
Copy link
Member

niden commented Apr 20, 2021

@StudioMaX Thank you for reporting this!

Resolved in: #15416

@niden niden closed this as completed Apr 20, 2021
@niden niden moved this to Released in Phalcon v5 Aug 25, 2022
@niden niden added this to Phalcon v5 Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release breaks bc Functionality that breaks Backwards Compatibility bug A bug report status: high High
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants