So if I understand correctly, this is how to use PHP 7.4 in CLI with Plesk:
https://docs.plesk.com/en-US/obsidian/administrator-guide/web-hosting/php-management/running-php-scripts-from-the-command-line.76345/
I tried it but I get a different error
[root@server forum.somedomain.net]# /opt/plesk/php/7.4/bin/php flarum migrate
PHP Fatal error: Cannot use ::class with dynamic class name in /var/www/vhosts/somedomain.net/forum.somedomain.net/vendor/laminas/laminas-diactoros/src/Uri.php on line 216
Edit: Apparently this error is related to PHP 8.0 requirement but I run 7.4 now, but what is laminas and how do I get the 7.4 version? Can't find it in my composer.json
{
"name": "flarum/flarum",
"description": "Delightfully simple forum software.",
"type": "project",
"keywords": [
"forum",
"discussion"
],
"homepage": "https://flarum.org/",
"license": "MIT",
"authors": [
{
"name": "Franz Liedke",
"email": "franz@develophp.org"
},
{
"name": "Daniel Klabbers",
"email": "daniel@klabbers.email",
"homepage": "https://luceos.com"
},
{
"name": "David Sevilla Martin",
"email": "me+flarum@datitisev.me",
"homepage": "https://datitisev.me"
},
{
"name": "Clark Winkelmann",
"email": "clark.winkelmann@gmail.com",
"homepage": "https://clarkwinkelmann.com"
},
{
"name": "Matthew Kilgore",
"email": "matthew@kilgore.dev"
}
],
"support": {
"issues": "https://github.com/flarum/core/issues",
"source": "https://github.com/flarum/flarum",
"docs": "https://flarum.org/docs/"
},
"require": {
"flarum/approval": "*",
"flarum/bbcode": "*",
"flarum/core": "^1.0",
"flarum/emoji": "*",
"flarum/flags": "*",
"flarum/lang-english": "*",
"flarum/likes": "*",
"flarum/lock": "*",
"flarum/markdown": "*",
"flarum/mentions": "*",
"flarum/pusher": "*",
"flarum/statistics": "*",
"flarum/sticky": "*",
"flarum/subscriptions": "*",
"flarum/suspend": "*",
"flarum/tags": "*",
"fof/spamblock": "*"
},
"config": {
"preferred-install": "dist",
"sort-packages": true
},
"prefer-stable": true
}