Symfony

Symfony is supported via the sentry-symfony package as a native bundle.

Install

Install the sentry/sentry-symfony package:

Copied
$ composer require sentry/sentry-symfony

Configure

Add your DSN to app/config/config.yml:

app/config/config.yml
Copied
sentry:
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0"

If you are not using Symfony Flex, you'll also need to enable the bundle in app/AppKernel.php:

app/AppKernel.php
Copied
<?php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Sentry\SentryBundle\SentryBundle(),
        );

        // ...
    }

    // ...
}
You can edit this page on GitHub.
On this page