Confusion about Permission Registration + Gate #2640
Unanswered
connormcmanustw
asked this question in
Q&A
Replies: 1 comment
-
|
In v6, in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have recently shifted from an old Laravel 8 application up to Laravel 11, as well as updated this package to v6.
Upon inspection of what the old app was doing, after deep-diving into the base Laravel
Gateclass(Illuminate\Auth\Access\Gate.php), thePermissionRegistrarfrom this package was being included in the "beforeCallbacks" array of that GateClass. See below:This is the dump output:

However, after shifting + updating the package, that dump is empty, and the
PermissionRegistraris no longer included. This is causing a different flow in the conditional, as seen in the snippet above:...
$resultisnull, since there are nobeforeCallbacksarray items (where thePermissionRegistrarpreviously was), and causing the if statement to hit, which, just based on what I'm seeing, is the issue.This difference is causing a lot of my blade directives to fail, and I'm just trying to figure out what exactly I need to change.
Beta Was this translation helpful? Give feedback.
All reactions