PHP SDK 2.0 - Feedback

As described in the Blog Post (link soon), we also unified our PHP SDK.

This is a breaking change and code changes are necessary if you were using 1.x before.

Usage now is as simple as:

\Sentry\init(['dsn' => '___PUBLIC_DSN___' ]);

\Sentry\configureScope(function (\Sentry\State\Scope $scope): void {
     $scope->setTag('page_locale', 'de-at');
     $scope->setUser(['email' => 'john.doe@example.com']);
     $scope->setLevel(\Sentry\Severity::warning());
     $scope->setExtra('character_name', 'Mighty Fighter');
});

// The following capture call will contain the data from the previous configured Scope
try {
    thisFunctionThrows(); // -> throw new \Exception('foo bar');
} catch (\Exception $exception) {
    \Sentry\captureException($exception);
}

\Sentry\addBreadcrumb(new Breadcrumb(Breadcrumb::LEVEL_ERROR, Breadcrumb::TYPE_ERROR, 'error_reporting', 'Message'));

A very detailed guide what changed and how to use it now can be found here: sentry-php/UPGRADE-2.0.md at master · getsentry/sentry-php · GitHub

In general we made sure to make usage easier and if you are already familiar with one of our other unified SDKs (JavaScript, Python, Rust, .Net) it should feel very familiar.

In case you have any feedback feel free to post here.
In case you encountering any bugs please post them on Github: Issues · getsentry/sentry-php · GitHub

Thanks,
Daniel