vendor/sentry/sentry-symfony/src/SentryBundle.php line 23

Open in your IDE?
  1. <?php
  2. namespace Sentry\SentryBundle;
  3. use Jean85\PrettyVersions;
  4. use Sentry\SentrySdk;
  5. use Sentry\State\HubInterface;
  6. use Symfony\Component\HttpKernel\Bundle\Bundle;
  7. class SentryBundle extends Bundle
  8. {
  9.     public const SDK_IDENTIFIER 'sentry.php.symfony';
  10.     public static function getSdkVersion(): string
  11.     {
  12.         return PrettyVersions::getVersion('sentry/sentry-symfony')
  13.             ->getPrettyVersion();
  14.     }
  15.     /**
  16.      * This method avoids deprecations with sentry/sentry:^2.2
  17.      */
  18.     public static function getCurrentHub(): HubInterface
  19.     {
  20.         return SentrySdk::getCurrentHub();
  21.     }
  22.     /**
  23.      * This method avoids deprecations with sentry/sentry:^2.2
  24.      */
  25.     public static function setCurrentHub(HubInterface $hub): void
  26.     {
  27.         SentrySdk::setCurrentHub($hub);
  28.     }
  29. }