Describe your environment
When ext-opentelemetry is enabled and codebase has classes with #[WithSpan] attribute, opentelemetry.attr_hooks_enabled = On also needs to be set. Otherwise, the following warning is thrown in runtime:
Warning: ClassName::method(): OpenTelemetry: WithSpan attribute found but attribute hooks disabled in Unknown on line 0
It's fine having opentelemetry.attr_hooks_enabled = On in the running code, however, PHPUnit will crash with a nebulous segfault:
zsh: trace trap ./vendor/bin/phpunit tests/
Steps to reproduce
PHP 8.2.27
PHPUnit 10.5.40
php.ini
opentelemetry.attr_hooks_enabled = On
What is the expected behavior?
Disable warning or hooks in some way and not trigger warning
What is the actual behavior?
Unless I delete #[WithSpan] attributes or disable ext-opentelemetry altogether, there is no way to fix this.