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

Add Cache Repository getter on PermissionRegistrar #1946

Merged
merged 1 commit into from
Jan 3, 2022

Conversation

angeljqv
Copy link
Contributor

Make public Cache Repository getter, usefull when creating custom traits and we want to manipulate permission cache repository
Also acording https://spatie.be/guidelines/laravel-php#docblocks, phpdoc from getCacheStore removed

}

protected function getCacheStoreFromConfig(): \Illuminate\Contracts\Cache\Repository
public function getCacheRepository(): Repository
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renaming this function seems like unnecessarily risky. Why not just change protected to public so this won't break other people's code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@freekmurze done,
I added a specific getter for that, not breaking changes

@angeljqv angeljqv changed the title Make public Cache Repository getter Add Cache Repository getter on PermissionRegistrar Dec 17, 2021
@freekmurze freekmurze merged commit 3aab62f into spatie:main Jan 3, 2022
@freekmurze
Copy link
Member

Thanks!

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.

None yet

2 participants