I tested bumping the PHP version on my shared hosting to 8.1.1 and then executing the following commands:
composer update --prefer-dist --no-plugins --no-dev -a --with-all-dependencies
php flarum migrate
php flarum cache:clear
However after that I couldn't open the forum and observed the following errors:
Fatal error: Uncaught Laminas\HttpHandlerRunner\Exception\EmitterException: Unable to emit response; headers already sent in /home/customer/www/mydomain.com/public_html/forum/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:19 Stack trace: #0 /home/customer/www/mydomain.com/public_html/forum/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitterTrait.php(36): Laminas\HttpHandlerRunner\Exception\EmitterException::forHeadersSent() #1 /home/customer/www/mydomain.com/public_html/forum/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitter.php(27): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->assertNoPreviousOutput() #2 /home/customer/www/mydomain.com/public_html/forum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(98): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->emit(Object(Laminas\Diactoros\Response\HtmlResponse)) #3 /home/customer/www/mydomain.com/public_html/forum/vendor/flarum/core/src/Http/Server.php(44): Laminas\HttpHandlerRunner\RequestHandlerRunner->run() #4 /home/customer/www/mydomain.com/public_html/forum/index.php(26): Flarum\Http\Server->listen() #5 {main} thrown in /home/customer/www/mydomain.com/public_html/forum/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php on line 19
So, I reverted back to PHP 7.4. Is it something wrong that I am doing?