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

Alias will grab macros from \Illuminate\Database\Eloquent\Builder too #1118

Merged
merged 5 commits into from
Dec 21, 2020

Conversation

LastDragon-ru
Copy link
Contributor

Summary

The \Illuminate\Database\Eloquent\Builder is also Macroable but doesn't use the standard Macroable trait and for this reason, its macros are not included in helper.php. This PR fixes it.

Fixes: #1070

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • Existing tests have been adapted and/or new tests have been added

@mfn
Copy link
Collaborator

mfn commented Dec 11, 2020

@LastDragon-ru is it possible to have a test, showing the effect of this change?

@LastDragon-ru
Copy link
Contributor Author

LastDragon-ru commented Dec 12, 2020

@mfn, yep, I added a few tests.

@barryvdh barryvdh requested a review from mfn December 21, 2020 08:40
@barryvdh barryvdh merged commit 36c4406 into barryvdh:master Dec 21, 2020
bytestream pushed a commit to bytestream/laravel-ide-helper that referenced this pull request Apr 20, 2021
… too (barryvdh#1118)

* `Alias` will grab macros from `\Illuminate\Database\Eloquent\Builder` too.

* `@return` will contains `|static` for Eloquent Builder macros which return Eloquent Builder instance.

* `Macro` tests.

* `Alias::detectMethods()` tests.

* Mock classes rename.

(cherry picked from commit 36c4406)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Eloquent Query Builder Macros
3 participants