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

[6.x] Improvements on subqueries #30307

Merged
merged 3 commits into from
Oct 18, 2019
Merged

Commits on Oct 16, 2019

  1. Determine if the value is queryable

    This method allows the query builder to check if a value is queryable and can be used to perform subqueries.
    
    Those checks were performed in 4 different places in the query builder so the repetition is now extracted to a single method.
    sebdesign committed Oct 16, 2019
    Configuration menu
    Copy the full SHA
    4ff93b7 View commit details
    Browse the repository at this point in the history
  2. Add more context about invalid subqueries

    The valid values for performing subqueries are query builder instances, closures and strings.
    
    If the value is not one of the above, an InvalidArgumentException was thrown without any message. I've added a sensible message, and also some `@throws` docblock tags to the affected methods.
    
    I've also added some tests that confirm these methods can indeed throw exceptions when misused.
    sebdesign committed Oct 16, 2019
    Configuration menu
    Copy the full SHA
    ab5ee8a View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2019

  1. Remove @throws docblock tags

    sebdesign committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    6d06919 View commit details
    Browse the repository at this point in the history