-
-
Notifications
You must be signed in to change notification settings - Fork 633
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
use when@prod for sentry #1420
use when@prod for sentry #1420
Conversation
Thanks for the PR 😍 How to test these changes in your application
Diff between recipe versionsIn order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. sentry/sentry-symfony1.0 vs 3.0diff --git a/sentry/sentry-symfony/1.0/config/packages/prod/sentry.yaml b/sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml
index 342036fe..a5ccf756 100644
--- a/sentry/sentry-symfony/1.0/config/packages/prod/sentry.yaml
+++ b/sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml
@@ -1,2 +1,22 @@
sentry:
dsn: '%env(SENTRY_DSN)%'
+ options:
+ excluded_exceptions:
+ - 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
+
+# monolog:
+# handlers:
+# sentry:
+# type: service
+# id: Sentry\Monolog\Handler
+
+# services:
+# Sentry\Monolog\Handler:
+# arguments:
+# $hub: '@Sentry\State\HubInterface'
+# $level: !php/const Monolog\Logger::ERROR
diff --git a/sentry/sentry-symfony/1.0/config/packages/sentry.yaml b/sentry/sentry-symfony/1.0/config/packages/sentry.yaml
deleted file mode 100644
index e94da2d6..00000000
--- a/sentry/sentry-symfony/1.0/config/packages/sentry.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-sentry:
- options:
- curl_method: async
-
-# skip_capture: # To skip certain exceptions, specify a list below
-# - 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException'
-# - 'Symfony\Component\HttpKernel\Exception\BadRequestHttpException'
-# - 'Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException'
diff --git a/sentry/sentry-symfony/1.0/manifest.json b/sentry/sentry-symfony/3.0/manifest.json
index c96ec90e..097e7e84 100644
--- a/sentry/sentry-symfony/1.0/manifest.json
+++ b/sentry/sentry-symfony/3.0/manifest.json
@@ -1,6 +1,6 @@
{
"bundles": {
- "Sentry\\SentryBundle\\SentryBundle": ["all"]
+ "Sentry\\SentryBundle\\SentryBundle": ["prod"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/" 3.0 vs 4.0diff --git a/sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml b/sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml
deleted file mode 100644
index a5ccf756..00000000
--- a/sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-sentry:
- dsn: '%env(SENTRY_DSN)%'
- options:
- excluded_exceptions:
- - 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
-
-# monolog:
-# handlers:
-# sentry:
-# type: service
-# id: Sentry\Monolog\Handler
-
-# 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 00000000..b68541db
--- /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/3.0/manifest.json b/sentry/sentry-symfony/4.0/manifest.json
index 097e7e84..9e07f9cc 100644
--- a/sentry/sentry-symfony/3.0/manifest.json
+++ b/sentry/sentry-symfony/4.0/manifest.json
@@ -7,5 +7,8 @@
},
"env": {
"SENTRY_DSN": ""
+ },
+ "conflict": {
+ "symfony/framework-bundle": "<5.4"
}
} |
Can we merge it @nicolas-grekas :)? |
Taking over #1419