You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmmm. We might need to code a fallback for the missing key.
As a workaround, I'd suggest taking the config file from this repo and merge its updates into your own app's old config file.
That should get around the issue.
Please report back, as your feedback will help determine the best "fix" to build into the package.
@drbyte Thank you very much for your response.
Following your advice, I added the following to permissions.php (under section "column_names") and the problem was solved.
/*
* Change this if you want to use the teams feature and your related model's
* foreign key is other than `team_id`.
*/
'team_foreign_key' => 'team_id',
@erikn69 Do you think it's best to just declare public string $teamsKey; as nullable? Or have the config lookup default to 'team_id' instead of null?
drbyte
changed the title
Unable to upgrade to v6.0.0
[6.0.0] Cannot assign null to property Spatie\Permission\PermissionRegistrar::$teamsKey of type string
Nov 2, 2023
Was trying to upgrade from v5.11.1 to v6.0.0 but wasn't able to complete the upgrade process.
Versions
To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: