Skip to content

Add a register_error_handler config option #687

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

Merged

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented Dec 13, 2022

My second attempt at getsentry/sentry-php#1439 .

Pretty much what was described in #337 (comment) , eg:

sentry:
    dsn: '%env(SENTRY_DSN)%'
    register_error_listener: false
    register_error_handler: false

monolog:
    handlers:
        sentry:
            type: sentry
            level: !php/const Monolog\Logger::ERROR
            hub_id: Sentry\State\HubInterface

@@ -111,9 +112,9 @@ private function registerConfiguration(ContainerBuilder $container, array $confi
}, $options['class_serializers']);
}

if (isset($options['integrations'])) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isset was unnecessary since the configuration always returns an array.

@HypeMC HypeMC force-pushed the add-register-error-handler-option branch from b19b8c4 to 4b26934 Compare December 14, 2022 10:05
@cleptric
Copy link
Member

Thanks for the contribution! I'll take a look in January, as we're wrapping up things for this year.

@cleptric cleptric self-assigned this Jan 9, 2023
@cleptric cleptric changed the base branch from master to develop February 3, 2023 10:27
Copy link
Member

@cleptric cleptric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this LGTM! Thanks for your work on this 🙂

@cleptric cleptric merged commit b009a70 into getsentry:develop Feb 3, 2023
@HypeMC HypeMC deleted the add-register-error-handler-option branch February 3, 2023 10:58
@cleptric cleptric added this to the 4.6.0 milestone Feb 3, 2023
@HypeMC
Copy link
Contributor Author

HypeMC commented Feb 15, 2023

FYI, I've opened a PR for this option in the Symfony recipes repo symfony/recipes-contrib#1485

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants