Skip to content

Commit 3947a83

Browse files
Jean85mitsuhiko
authored andcommitted
Update install information (#96)
1 parent e4aa264 commit 3947a83

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,18 @@ class AppKernel extends Kernel
4141
{
4242
$bundles = array(
4343
// ...
44-
45-
new Sentry\SentryBundle\SentryBundle(),
4644
);
4745

46+
if (in_array($this->getEnvironment(), ['staging', 'prod'], true)) {
47+
$bundles[] = new Sentry\SentryBundle\SentryBundle();
48+
}
4849
// ...
4950
}
5051

5152
// ...
5253
}
5354
```
55+
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)).
5456

5557
### Step 3: Configure the SDK
5658

0 commit comments

Comments
 (0)