From 934934e0106145f45b131097ba2e04d10e17b4c7 Mon Sep 17 00:00:00 2001 From: Martin Linzmayer Date: Thu, 19 Nov 2026 11:16:51 +0100 Subject: [PATCH] Prepare 4.38.0 --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c930ff8e..f24cfd7f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # CHANGELOG +## 4.38.0 + +The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.38.0. + +### Features + +- Add `Scope::setUserResolver()` to resolve the user lazily each time it is read, instead of setting it upfront. User data set with `Scope::setUser()` takes precedence over the data the resolver returns. [(#2396)](https://github.com/getsentry/sentry-php/pull/2396) + + ```php + \Sentry\configureScope(static function (\Sentry\State\Scope $scope): void { + $scope->setUserResolver(static function (): ?\Sentry\UserDataBag { + // Return null as long as the user is not known yet + return \Sentry\UserDataBag::createFromUserIdentifier('1234'); + }); + }); + ``` + ## 5.0.0-beta1 The Sentry SDK team is happy to announce the first beta release of Sentry PHP SDK v5.0.0.