I found out that this is incompatible with dexif/telegram
after 2 months of testing.
This will happen if the two are enabled at same time:
Notice: Trying to get property 'identifier' of non-object in /PathToFlarum/vendor/dexif/telegram/src/Listeners/AddUserAttributes.php on line 34
Fatal error: Uncaught Laminas\HttpHandlerRunner\Exception\EmitterException: Output has been emitted previously; cannot emit response in vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:24 Stack trace: #0 vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitterTrait.php(40): Laminas\HttpHandlerRunner\Exception\EmitterException::forOutputSent() #1 vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitter.php(27): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->assertNoPreviousOutput() #2 vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(98): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->emit(Object(Laminas\Diactoros\Response\HtmlResponse)) #3 vendor/flarum/core/src/Http/Server.php(42): Laminas\HttpHandlerRunner\RequestHandlerRunner->run() #4 /index.php(22): Flarum\Http\Server in vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php on line 24