feature #28954 [Debug] Mark ErrorHandler and ExceptionHandler classes as final (fancyweb)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[Debug] Mark ErrorHandler and ExceptionHandler classes as final

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | not yet
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The goal of marking this method final is to be able to change the argument signature to `\Throwable` in Symfony 5.0

We will then be able to convert the incoming `\Throwable` to `\ErrorException` thanks to the `FatalThrowableError` class.

The use case is when you use the `ExceptionHandler::register()` method of the `Debug` component with a custom `set_error_handler()` that don't handle this conversion. This is for example the case of the `Drupal` one.

Commits
-------

2a4e2e614b [Debug] Mark the ErrorHandler and ExceptionHandler classes as final
This commit is contained in:
Nicolas Grekas 2018-12-01 11:04:56 +01:00
commit 8aee36dbd5
3 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,11 @@
CHANGELOG
=========
4.3.0
-----
* made the `ErrorHandler` and `ExceptionHandler` classes final
4.0.0
-----

View File

@ -45,6 +45,8 @@ use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler;
*
* @author Nicolas Grekas <p@tchwork.com>
* @author Grégoire Pineau <lyrixx@lyrixx.info>
*
* @final since Symfony 4.3
*/
class ErrorHandler
{

View File

@ -26,6 +26,8 @@ use Symfony\Component\HttpKernel\Debug\FileLinkFormatter;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Nicolas Grekas <p@tchwork.com>
*
* @final since Symfony 4.3
*/
class ExceptionHandler
{