Description
After updating to flownative/sentry v3.2 with sentry/sentry ^4.0, the application (docker container) crashes with the following error:
The option "ignore_exceptions" with value array is expected to be of type "string[]",
but one of the elements is of type "int".
Type: Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
File: Packages/Libraries/symfony/options-resolver/OptionsResolver.php
Line: 1062
Cause
In SentryClient.php line 135:
'ignore_exceptions' => array_keys(array_filter($this->excludeExceptionTypes)),
The array_keys() function returns integer keys when the original array has numeric indices. The Sentry SDK v4 now strictly validates that ignore_exceptions must be string[].
Suggested Fix
'ignore_exceptions' => array_map('strval', array_keys(array_filter($this->excludeExceptionTypes))),
Environment
• PHP: 8.2
• flownative/sentry: 3.2.0
• sentry/sentry: ^4.0
• Neos Flow: 9.1
Description
After updating to flownative/sentry v3.2 with sentry/sentry ^4.0, the application (docker container) crashes with the following error:
Cause
In SentryClient.php line 135:
'ignore_exceptions' => array_keys(array_filter($this->excludeExceptionTypes)),The array_keys() function returns integer keys when the original array has numeric indices. The Sentry SDK v4 now strictly validates that ignore_exceptions must be string[].
Suggested Fix
'ignore_exceptions' => array_map('strval', array_keys(array_filter($this->excludeExceptionTypes))),Environment
• PHP: 8.2
• flownative/sentry: 3.2.0
• sentry/sentry: ^4.0
• Neos Flow: 9.1