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

@can directive improvements #2483

Merged
merged 23 commits into from
Dec 11, 2023
Merged

@can directive improvements #2483

merged 23 commits into from
Dec 11, 2023

Conversation

k0ka
Copy link
Collaborator

@k0ka k0ka commented Dec 10, 2023

Resolves #2453
Resolves #2225

  • Added or updated tests
  • Documented user facing changes
  • Updated CHANGELOG.md

Changes

  • Split up @can directive into @canFind, @canModel, @canQuery, @canResolved and @canRoot
  • Added action and return_value arguments to @can* family of directives
  • Allows using any objects in @can* family of directives

Breaking changes

The @can directive is deprecated and would be removed in the next major update.

@k0ka k0ka added the enhancement A feature or improvement label Dec 10, 2023
Copy link
Collaborator

@spawnia spawnia left a comment

Choose a reason for hiding this comment

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

Thanks for starting this.

CHANGELOG.md Outdated Show resolved Hide resolved
UPGRADE.md Show resolved Hide resolved
docs/master/api-reference/directives.md Outdated Show resolved Hide resolved
docs/master/security/authorization.md Outdated Show resolved Hide resolved
docs/master/security/authorization.md Outdated Show resolved Hide resolved
src/Auth/CanResolvedDirective.php Outdated Show resolved Hide resolved
tests/Integration/Auth/CanFindDirectiveDBTest.php Outdated Show resolved Hide resolved
tests/Unit/Auth/CanDirectiveTestBase.php Outdated Show resolved Hide resolved
tests/Unit/Auth/CanModelDirectiveTest.php Outdated Show resolved Hide resolved
tests/Unit/Auth/CanRootDirectiveTest.php Show resolved Hide resolved
k0ka and others added 6 commits December 10, 2023 19:34
- fixed "or :[]" in directives.md
- fixed exception explanation in @canResolved
- change @eq to @WhereKey in tests
- add final to tests
- remove unused "query:true" arguments in CanQueryDirectiveDBTest
CHANGELOG.md Outdated Show resolved Hide resolved
UPGRADE.md Outdated Show resolved Hide resolved
docs/master/api-reference/directives.md Outdated Show resolved Hide resolved
docs/master/api-reference/directives.md Outdated Show resolved Hide resolved
docs/master/security/authorization.md Outdated Show resolved Hide resolved
docs/master/security/authorization.md Show resolved Hide resolved
docs/master/security/authorization.md Outdated Show resolved Hide resolved
docs/master/security/authorization.md Outdated Show resolved Hide resolved
docs/master/security/authorization.md Outdated Show resolved Hide resolved
docs/master/security/authorization.md Outdated Show resolved Hide resolved
src/Auth/CanResolvedDirective.php Outdated Show resolved Hide resolved
tests/Integration/Auth/CanFindDirectiveDBTest.php Outdated Show resolved Hide resolved
tests/Integration/Auth/CanFindDirectiveDBTest.php Outdated Show resolved Hide resolved
tests/Integration/Auth/CanFindDirectiveDBTest.php Outdated Show resolved Hide resolved
tests/Integration/Auth/CanResolvedDirectiveDBTest.php Outdated Show resolved Hide resolved
tests/Unit/Auth/CanDirectiveTestBase.php Outdated Show resolved Hide resolved
src/Auth/BaseCanDirective.php Show resolved Hide resolved
src/Auth/CanResolvedDirective.php Outdated Show resolved Hide resolved
@spawnia spawnia merged commit e2092a9 into master Dec 11, 2023
@spawnia spawnia deleted the can-improvement branch December 11, 2023 12:54
@spawnia
Copy link
Collaborator

spawnia commented Dec 11, 2023

Thank you, released with https://github.com/nuwave/lighthouse/releases/tag/v6.27.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature or improvement
Projects
None yet
2 participants