Skip to content

Fix: Example in config comment includes permission. prefix on wildcard_permission key #2835

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jerrens
Copy link

@jerrens jerrens commented Apr 21, 2025

In the permission.php template file, the example in the comments for how to override the WildcardPermission class incorrectly uses permission.wildcard_permission as the key instead of just wildcard_permission.

Developers attempting to point to a custom class who uncomment this line and only update the value will still be using the default provided WildcardPermission class. This config entry is used in src/Traits/HasPermissions.php with the code config('permission.wildcard_permission'...). The convention of the config method is the value before the dot delimiter (permission) is the config file name (permission.php) and the value after the delimiter (wildcard_permission) is the key in the array returned to use. See https://laravel.com/docs/12.x/configuration#accessing-configuration-values for documentation.

In the `permission.php` template file, the example in the comments for how to override the `WildcardPermission` class incorrectly uses `permission.wildcard_permission` as the key instead of just `wildcard_permission`.
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.

1 participant