Besides other information you can find throughout this forum around installing Flarum with shared hosting, here's the latest thing I've learned.
In the past this was not evident because PHP versions weren't changing as much.
If you go to install Flarum via composer with a shared hosting provider, you may get an error that your PHP version is not compatible. Usually, shared hosts will let you change the PHP version. However, this may not help. Because also usually, shared hosts have composer installed somewhere else. So, yes, you changed your PHP to version 8+, but where composer is installed, it may only be 7.something or less.
You can try (if using PHP 8) this:
php8 composer require...
But if that doesn't work it may be that you simply need to ask your web host for the proper command. It could be something like:
you/php8/folder/php-cli composer require...
The above will not work, it's an example showing that to force usage of a certain PHP version via command line, you have to point to it properly. And with shared hosts, it's not going to be the plain old
I hope this helps someone one day. Us shared hosting users must stick together. Haha! 😂
--ignore-platform-reqs but I'm trying to offer a little bit safer solution. Which is: ask your host for the path.