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
Gate
class(Illuminate\Auth\Access\Gate.php)
, thePermissionRegistrar
from 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
PermissionRegistrar
is no longer included. This is causing a different flow in the conditional, as seen in the snippet above:...
$result
isnull
, since there are nobeforeCallbacks
array items (where thePermissionRegistrar
previously 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