symfony / monolog-bundle

Symfony Monolog Bundle
symfony.com
MIT License
2.89k stars 231 forks source link

Monolog error after sentry added #447

Open DZymelka opened 1 year ago

DZymelka commented 1 year ago

After adding sentry to symfony project, many deprecated errors appeared.

One of them: User Deprecated: The "Monolog\Logger" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Bridge\Monolog\Logger".

I am using:

My sentry.yaml:

sentry:
    dsn: '%env(SENTRY_DSN)%'
    register_error_listener: false
    options:
        environment: "%kernel.environment%.%env(APP_DOMAIN)%"
        release: '%env(APP_RELEASE)%'

monolog:
    handlers:
        sentry:
            type: sentry
            level: !php/const Monolog\Logger::ERROR
            hub_id: Sentry\State\HubInterface
GromNaN commented 1 year ago

Thank you for reporting this issue. It have been discussed in https://github.com/symfony/symfony/issues/47096 and we are looking for someone to contribute the solution.