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

Fix return value of query scopes from parent class #1366

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

sforward
Copy link
Contributor

@sforward sforward commented Aug 17, 2022

This PR fixes the return value of query scope methods that are defined in a parent class of the target model. At the moment the return value contains the class name where the method is located: @method static \Illuminate\Database\Eloquent\Builder|PostParent active(), and with this change it correctly becomes @method static \Illuminate\Database\Eloquent\Builder|Post active(). See included test for more context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Existing tests have been adapted and/or new tests have been added
  • Add a CHANGELOG.md entry
  • Update the README.md
  • Code style has been fixed via composer fix-style

@sforward sforward force-pushed the fix/query-scope-parent-class branch from 6e5dd0c to 4f72d0e Compare March 27, 2024 08:37
@sforward
Copy link
Contributor Author

@barryvdh or @mfn This is PR is still relevant for the latest version, could you please consider reviewing / merging?

Copy link
Collaborator

@mfn mfn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM!

Also double verified when reverting the code change and seeing the wrong class reference in the phpdoc 👌🏼

@barryvdh barryvdh merged commit 6338abb into barryvdh:master Apr 1, 2024
26 checks passed
@barryvdh
Copy link
Owner

barryvdh commented Apr 1, 2024

Thanks!

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.

3 participants