Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Conversation

@netdown
Copy link
Contributor

@netdown netdown commented May 28, 2020

Debug component was deprecated and replaced by ErrorHandler in Symfony 4.4. Laravel 7 uses a Symfony 5 which does not contain Debug anymore, therefore app crashes.
ErrorHandler does not have a similar class, therefore I extracted a little bit of logic from the old FatalThrowableError to construct a FatalError object.
Fixes #406

EDIT: using getCode() on exception may be a better choice, however, it would behave differently than the old class.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 68.128% when pulling e9de2aa on netdown:master into 2271aa7 on swooletw:master.

@paschaldev
Copy link

Need this

@netdown
Copy link
Contributor Author

netdown commented Aug 4, 2020

@albertcht Would you be able to merge some of the pull requests and make a release?

@albertcht albertcht merged commit e9de2aa into swooletw:master Sep 21, 2020
@serdarozturk
Copy link

Maybe we should check the class existence for coverage issue.

if (class_exists(FatalThrowableError::class)) { $e = new FatalThrowableError($e); } else { if ($e instanceof \ParseError) { $severity = E_PARSE; } elseif ($e instanceof \TypeError) { $severity = E_RECOVERABLE_ERROR; } else { $severity = E_ERROR; } $error = [ 'type' => $severity, 'message' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine(), ]; $e = new FatalError($e->getMessage(), $e->getCode(), $error, null, true, $e->getTrace()); }
@Arkanius
Copy link
Contributor

@serdarozturk you say it in order to keep compatibility with older versions?

@ValeraBot
Copy link

Why it is not in master?

@lagerroos
Copy link

@albertcht Has this been removed from master and if so, why would that be?

lagerroos added a commit to lagerroos/laravel-swoole that referenced this pull request Nov 29, 2020
Arkanius added a commit that referenced this pull request Jan 6, 2021
Reverted missing fixes PR #417 on FatalThrowableError missing
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

8 participants