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

[5.8] Add InvalidArgumentException For orderBy() in Illuminate\Database\Query\Builder #27029

Merged

Conversation

Projects
None yet
4 participants
@cocoeyes02
Copy link
Contributor

commented Jan 2, 2019

This PR is related to laravel/ideas#1434

I add InvalidArgumentException For orderBy() in Illuminate\Database\Query\Builder because this prevents the bug of direction making unintentionally.
For example, if orderBy('id', 'aesc') executes...

Before: means orderBy('id', 'desc').
After: throws InvalidArgumentException.

cocoeyes02 added some commits Jan 2, 2019

Show resolved Hide resolved src/Illuminate/Database/Query/Builder.php Outdated
@bonzai

This comment has been minimized.

Copy link
Contributor

commented Jan 2, 2019

Just for the record, it was already suggested in #26795.

@taylorotwell taylorotwell merged commit c63e562 into laravel:master Jan 2, 2019

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@cocoeyes02 cocoeyes02 deleted the cocoeyes02:add_invalid_exception_for_order_by branch Jan 2, 2019

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