From d034be1343108ab54eaf2f03007c8f8de5235d0d Mon Sep 17 00:00:00 2001 From: David Cramer Date: Thu, 21 Jul 2016 12:23:42 -0700 Subject: [PATCH] Add SDK information for sentry-symfony --- .../DependencyInjection/Configuration.php | 2 +- .../EventListener/ExceptionListener.php | 3 ++- src/Sentry/SentryBundle/SentryBundle.php | 4 ++-- src/Sentry/SentryBundle/SentrySymfonyClient.php | 15 +++++++++++++++ 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 src/Sentry/SentryBundle/SentrySymfonyClient.php diff --git a/src/Sentry/SentryBundle/DependencyInjection/Configuration.php b/src/Sentry/SentryBundle/DependencyInjection/Configuration.php index f008ca11..84c36149 100644 --- a/src/Sentry/SentryBundle/DependencyInjection/Configuration.php +++ b/src/Sentry/SentryBundle/DependencyInjection/Configuration.php @@ -26,7 +26,7 @@ public function getConfigTreeBuilder() ->defaultNull() ->end() ->scalarNode('client') - ->defaultValue('Raven_Client') + ->defaultValue('Sentry\SentryBundle\SentrySymfonyClient') ->end() ->scalarNode('environment') ->defaultValue('%kernel.environment%') diff --git a/src/Sentry/SentryBundle/EventListener/ExceptionListener.php b/src/Sentry/SentryBundle/EventListener/ExceptionListener.php index f401be64..7e48083e 100644 --- a/src/Sentry/SentryBundle/EventListener/ExceptionListener.php +++ b/src/Sentry/SentryBundle/EventListener/ExceptionListener.php @@ -2,6 +2,7 @@ namespace Sentry\SentryBundle\EventListener; +use Sentry\SentryBundle; use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; use Symfony\Component\HttpKernel\HttpKernelInterface; @@ -42,7 +43,7 @@ public function __construct( array $skipCapture ) { if (!$client) { - $client = new \Raven_Client(); + $client = new SentrySymfonyClient(); } $this->tokenStorage = $tokenStorage; diff --git a/src/Sentry/SentryBundle/SentryBundle.php b/src/Sentry/SentryBundle/SentryBundle.php index 1c37b13e..fbdfd3a6 100644 --- a/src/Sentry/SentryBundle/SentryBundle.php +++ b/src/Sentry/SentryBundle/SentryBundle.php @@ -4,6 +4,6 @@ use Symfony\Component\HttpKernel\Bundle\Bundle; -class SentryBundle extends Bundle -{ +class SentryBundle extends Bundle { + const VERSION = '0.4.0'; } diff --git a/src/Sentry/SentryBundle/SentrySymfonyClient.php b/src/Sentry/SentryBundle/SentrySymfonyClient.php new file mode 100644 index 00000000..f4a5e6ae --- /dev/null +++ b/src/Sentry/SentryBundle/SentrySymfonyClient.php @@ -0,0 +1,15 @@ + 'sentry-symfony', + 'version' => SentryBundle::VERSION, + ); + parent::__construct($dsn, $options); + } +}