From 17699d509134a6a30dbd57450835218ccc65a877 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Sun, 9 Aug 2026 11:42:42 +0200 Subject: [PATCH] Fix Sentry documentation examples --- docs/guide/event-hooks.md | 4 ++-- docs/guide/performance-monitoring.md | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/guide/event-hooks.md b/docs/guide/event-hooks.md index 2b00df6..05e8591 100644 --- a/docs/guide/event-hooks.md +++ b/docs/guide/event-hooks.md @@ -45,9 +45,9 @@ class SentryOptionsContext implements EventListenerInterface public function setServerContext(Event $event): void { - /** @var \CakeSentry\Http\SentryClient $subject */ + /** @var \Sentry\State\HubInterface $subject */ $subject = $event->getSubject(); - $options = $subject->getHub()->getClient()->getOptions(); + $options = $subject->getClient()->getOptions(); $options->setEnvironment('test_app'); $options->setRelease('3.0.0@dev'); diff --git a/docs/guide/performance-monitoring.md b/docs/guide/performance-monitoring.md index e45bd37..795af90 100644 --- a/docs/guide/performance-monitoring.md +++ b/docs/guide/performance-monitoring.md @@ -11,12 +11,12 @@ return [ 'CakeSentry' => [ 'enableQueryLogging' => true, - 'enablePerformanceMonitoring' => true - ] + 'enablePerformanceMonitoring' => true, + ], 'Sentry' => [ 'dsn' => '', 'traces_sample_rate' => 1, - ] + ], ]; ``` @@ -34,6 +34,7 @@ return [ // ... ], ], +]; ``` ::: @@ -43,4 +44,4 @@ return [ > [!WARNING] > This is only available if you are on CakePHP 5.3+ and Version 3.5+ of this plugin -[CakePHP 5.3 added events](https://book.cakephp.org/5.x/core-libraries/caching.html#cache-events) for cache operations. If you already had performance monitoring enabled, you can now also see cache operations in Sentry. \ No newline at end of file +[CakePHP 5.3 added events](https://book.cakephp.org/5.x/core-libraries/caching.html#cache-events) for cache operations. If you already had performance monitoring enabled, you can now also see cache operations in Sentry.