Connehito / cake-sentry

CakePHP plugin integration for Sentry
MIT License
34 stars 26 forks source link

CakePHP 4.4: Use of `BaseErrorHandler` and subclasses are deprecated. #77

Closed scarabedore closed 1 year ago

scarabedore commented 1 year ago

Description

The file cake-sentry/config/bootstrap.php contains the following lines:

if ($isCli) {
    (new ConsoleErrorHandler(Configure::read('Error', [])))->register();
} else {
    (new ErrorHandler(Configure::read('Error', [])))->register();
}

These classes have been deprecated in CakePHP 4.4 and make my application crash with the following stack trace (simplified):

vendor/connehito/cake-sentry/src/Http/Client.php(144): Sentry\Severity::fromError('notice')
vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(94): deprecationWarning('Use of `BaseErrorHandler` and subclasses are deprecated...')
vendor/connehito/cake-sentry/config/bootstrap.php(22): Cake\Error\BaseErrorHandler->register()

How to reproduce

LordSimal commented 1 year ago

See https://github.com/Connehito/cake-sentry/issues/74