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

[8.x] Allow strings to be passed to the report function #35803

Merged
merged 1 commit into from Jan 6, 2021
Merged

[8.x] Allow strings to be passed to the report function #35803

merged 1 commit into from Jan 6, 2021

Conversation

freekmurze
Copy link
Contributor

@freekmurze freekmurze commented Jan 6, 2021

Right now, if you want to report something without your code throwing an exception, you have to manually create an exception and pass that to report.

$exception = new \Exception('Something weird occurred, that I want to report, but no exception was thrown'); 

report($exception);

With the change in this PR, that can be simplified, you can just pass a string to report.

report('something weird occurred');

I didn't find any tests for the report function, so I didn't add any. I will gladly add tests if you point where they should be added.

@freekmurze freekmurze changed the title [8.x] Allow string to be passed to report function [8.x] Allow strings to be passed to the report function Jan 6, 2021
@taylorotwell taylorotwell merged commit 1011218 into laravel:8.x Jan 6, 2021
@freekmurze freekmurze deleted the improve-report-function branch January 6, 2021 19:25
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