From 3947a83ce6fdccd9ad7eb7cbe1105550a0ba3504 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Tue, 28 Nov 2017 16:41:49 +0100 Subject: [PATCH] Update install information (#96) --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e6086ac..70a1baa2 100644 --- a/README.md +++ b/README.md @@ -41,16 +41,18 @@ class AppKernel extends Kernel { $bundles = array( // ... - - new Sentry\SentryBundle\SentryBundle(), ); + if (in_array($this->getEnvironment(), ['staging', 'prod'], true)) { + $bundles[] = new Sentry\SentryBundle\SentryBundle(); + } // ... } // ... } ``` +Note that, with this snippet of code, the bundle will be enabled only for the `staging` and `prod` environment; adjust it to your neeeds. It's discouraged to enable this bundle in the `test` environment, because the Sentry client will change the error handler, which is already used by other packages like Symfony's deprecation handler (see [#46](https://github.com/getsentry/sentry-symfony/issues/46) and [#95](https://github.com/getsentry/sentry-symfony/issues/95)). ### Step 3: Configure the SDK