Exception in line 895 of /…/Packages/Libraries/symfony/options-resolver/OptionsResolver.php: The option "environment" with value false is expected to be of type "null" or "string", but is of type "bool".
47 Symfony\Component\OptionsResolver\OptionsResolver::offsetGet()
46 Symfony\Component\OptionsResolver\OptionsResolver::resolve()
45 Sentry\Options::__construct()
44 Sentry\ClientBuilder::create()
43 PunktDe\Sentry\Flow\Handler\ErrorHandler_Original::initializeObject()
42 PunktDe\Sentry\Flow\Handler\ErrorHandler::__construct()
41 Neos\Flow\ObjectManagement\ObjectManager::instantiateClass()
40 Neos\Flow\ObjectManagement\ObjectManager::get()
39 PunktDe\Sentry\Neos\Aspect\FusionHandlerAspect::PunktDe\Sentry\Neos\Aspect\{closure}()
38 Closure::__invoke()
37 Neos\Flow\ObjectManagement\DependencyInjection\DependencyProxy::_activateDependency()
36 Neos\Flow\ObjectManagement\DependencyInjection\DependencyProxy::__call()
35 PunktDe\Sentry\Neos\Aspect\FusionHandlerAspect_Original::captureException()
…
In https://github.com/punktDe/sentry-flow/blob/88417874ab1ad0933cb4fc1956c6c01fe001dbd7/Classes/Handler/ErrorHandler.php#L72 when the value in
$settings['environment']
isfalse
(e.g. when using env var substitution but no variable is defined), that is used and leads toThe option "environment" with value false is expected to be of type "null" or "string", but is of type "bool".
This instead works:
$settings['environment'] ? $settings['environment'] : ''
(see https://3v4l.org/8j0bt)