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

Add global scope for Winter 1.1.x version #101

Closed
wants to merge 1 commit into from

Conversation

webbati
Copy link

@webbati webbati commented Oct 28, 2022

Global scopes documentation seem to refer only to Laravel 9.x (Winter 1.2.x), for previous version that are based on Laravel 6.x classes and methods are different (see https://laravel.com/docs/6.x/eloquent#global-scopes )

See issue wintercms/winter#747

Global scopes documentation seem to referr to Laravel 9.x (Winter 1.2.x) only, for previous version that are based on Laravel 6.x classes and methods are different.
See issue wintercms/winter#747
@mjauvin
Copy link
Member

mjauvin commented Oct 28, 2022

@webbati maybe reference this in the PR:

https://laravel.com/docs/6.x/eloquent#global-scopes

@bennothommo

This comment was marked as outdated.

@bennothommo
Copy link
Member

@webbati my apologies, I read your linked issue and understand the problem now.

@LukeTowers
Copy link
Member

Is it really necessary to change the class imports back to Illuminate or is it just required to make the booted() vs boot() change?

This should also be submitted to the 1.1 branch btw (https://github.com/wintercms/docs/tree/1.1), @bennothommo's new documentation site that will be out soon will allow you to switch between versions of the docs

@webbati
Copy link
Author

webbati commented Nov 2, 2022

@LukeTowers Yes, it's necessary or you will get an error

Declaration of Concreta\Zuum\Scopes\OwnedScope::apply(Winter\Storm\Database\Builder $builder, Winter\Storm\Database\Model $model) must be compatible with Illuminate\Database\Eloquent\Scope::apply(Illuminate\Database\Eloquent\Builder $builder, Illuminate\Database\Eloquent\Model $model)

@LukeTowers LukeTowers changed the base branch from main to 1.1 November 29, 2022 20:37
@LukeTowers LukeTowers changed the base branch from 1.1 to main November 29, 2022 20:37
@LukeTowers
Copy link
Member

@webbati can you resubmit this targeting only the 1.1 branch?

@webbati
Copy link
Author

webbati commented Nov 30, 2022

@LukeTowers done #110

@bennothommo
Copy link
Member

Closed in favour of #111.

@bennothommo bennothommo closed this Dec 2, 2022
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

4 participants