From 85baddfb3f1ba71154bc140790ff17786cd0c460 Mon Sep 17 00:00:00 2001 From: Robin Lehrmann Date: Mon, 11 Jul 2022 02:07:29 +0200 Subject: [PATCH] use when@prod for sentry --- .../3.0/config/packages/prod/sentry.yaml | 26 +++++++++---------- .../4.0/config/packages/sentry.yaml | 20 ++++++++++++++ sentry/sentry-symfony/4.0/manifest.json | 14 ++++++++++ 3 files changed, 47 insertions(+), 13 deletions(-) create mode 100644 sentry/sentry-symfony/4.0/config/packages/sentry.yaml create mode 100644 sentry/sentry-symfony/4.0/manifest.json diff --git a/sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml b/sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml index bc16c7f4b..a5ccf756b 100644 --- a/sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml +++ b/sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml @@ -5,18 +5,18 @@ sentry: - Symfony\Component\HttpKernel\Exception\NotFoundHttpException - Symfony\Component\Security\Core\Exception\AccessDeniedException - # If you are using Monolog, you also need these additional configuration and services to log the errors correctly: - # https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration - # register_error_listener: false +# If you are using Monolog, you also need these additional configuration and services to log the errors correctly: +# https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration +# register_error_listener: false - # monolog: - # handlers: - # sentry: - # type: service - # id: Sentry\Monolog\Handler +# monolog: +# handlers: +# sentry: +# type: service +# id: Sentry\Monolog\Handler - # services: - # Sentry\Monolog\Handler: - # arguments: - # $hub: '@Sentry\State\HubInterface' - # $level: !php/const Monolog\Logger::ERROR +# services: +# Sentry\Monolog\Handler: +# arguments: +# $hub: '@Sentry\State\HubInterface' +# $level: !php/const Monolog\Logger::ERROR diff --git a/sentry/sentry-symfony/4.0/config/packages/sentry.yaml b/sentry/sentry-symfony/4.0/config/packages/sentry.yaml new file mode 100644 index 000000000..b68541dba --- /dev/null +++ b/sentry/sentry-symfony/4.0/config/packages/sentry.yaml @@ -0,0 +1,20 @@ +when@prod: + sentry: + dsn: '%env(SENTRY_DSN)%' + +# If you are using Monolog, you also need these additional configuration and services to log the errors correctly: +# https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration +# register_error_listener: false + +# monolog: +# handlers: +# sentry: +# type: service +# id: Sentry\Monolog\Handler + +# services: +# Sentry\Monolog\Handler: +# arguments: +# $hub: '@Sentry\State\HubInterface' +# $level: !php/const Monolog\Logger::ERROR +# $bubble: false diff --git a/sentry/sentry-symfony/4.0/manifest.json b/sentry/sentry-symfony/4.0/manifest.json new file mode 100644 index 000000000..9e07f9ccc --- /dev/null +++ b/sentry/sentry-symfony/4.0/manifest.json @@ -0,0 +1,14 @@ +{ + "bundles": { + "Sentry\\SentryBundle\\SentryBundle": ["prod"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "env": { + "SENTRY_DSN": "" + }, + "conflict": { + "symfony/framework-bundle": "<5.4" + } +}