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

refactor: Change static properties to non-static #2324

Merged
merged 3 commits into from
Feb 10, 2023

Conversation

olivernybroe
Copy link
Contributor

@olivernybroe olivernybroe commented Feb 9, 2023

Make the static properties on PermissionRegistrar non-static.

This will make sure that if any of the properties are accessed, the cache initialization has happened first.

BREAKING CHANGE:
This is a breaking change as it will make all current migration files fail, as they are currently accessing the static properties which are not static anymore.

@erikn69
Copy link
Contributor

erikn69 commented Feb 9, 2023

What about call config helper instead of app?? olivernybroe#1

@olivernybroe
Copy link
Contributor Author

@erikn69 good idea, prob. more stable in long term, but won't solve that it's a breaking change 👍

@erikn69
Copy link
Contributor

erikn69 commented Feb 10, 2023

won't solve that it's a breaking change

yes, unfortunately

@drbyte
Copy link
Collaborator

drbyte commented Feb 10, 2023

Thanks guys.
Merging so we can test it in dev-master

@drbyte drbyte merged commit d70317f into spatie:main Feb 10, 2023
drbyte added a commit that referenced this pull request Feb 13, 2023
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.

3 participants