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

[9.x] Throw invalid argument exception from cache helper #40287

Merged
merged 1 commit into from
Jan 7, 2022
Merged

[9.x] Throw invalid argument exception from cache helper #40287

merged 1 commit into from
Jan 7, 2022

Conversation

axlon
Copy link
Contributor

@axlon axlon commented Jan 7, 2022

This PR changes the exception thrown by cache() to be an \InvalidArgumentException. Not only does this make more sense than the base \Exception class, editors such as PHPStorm will not complain about uncaught logic exceptions while they will complain about uncaught base exceptions.

image

This change should be non breaking, as any matching catch expression would still match.

@taylorotwell taylorotwell merged commit bb4035b into laravel:master Jan 7, 2022
@axlon axlon deleted the cache-invalidargument branch January 7, 2022 15:20
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.

2 participants