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

Allows models with any/all tags to be found disregarding type by passing false #155

Closed
wants to merge 1 commit into from
Closed

Allows models with any/all tags to be found disregarding type by passing false #155

wants to merge 1 commit into from

Conversation

PipStyles
Copy link

We were finding it a little restrictive not to be able to retrieve models by tag(s), disregarding type. This allows type to be ignored by passing false into the trait methods withAnyTags() and withAllTags(). NULL behaves as current.

This does have some crossover with #76, but is solving a different issue. This should only be breaking where false is being (inadvertently?) passed as second argument to methods above.

Tests added. All existing pass.

- e.g. $model->withAnyTags(['myTag'], false)
- HasTags@192 allows false to bypass the type check
@freekmurze
Copy link
Member

Thank you for this, but I prefer dedicated methods, like in #157, over a boolean. Hopefully that other PR can get merged soon!

@freekmurze freekmurze closed this Dec 20, 2018
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.

None yet

3 participants