I have a hard time updating the staging server. After performing Craft core and plugins updates locally on my Windows machine, I transferred the composer.json, composer.lock files, and also the migrate.yaml file and folders to the remote staging server. I have also added/updated the web/index.php + bootstrap.php files. composer install went through without errors.
Both frontend and backend stopped working. I get server errors 503.
What also stopped working, is the craft PHP script. When I call it as usual via SSH, I get the following response in the terminal:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Dotenv\Dotenv::create() must be an instance of Dotenv\Repository\RepositoryInterface, string given, called in /home/foo/www/lorem/ipsum/backend/craft on line 16 and defined in /home/foo/www/lorem/ipsum/backend/vendor/vlucas/phpdotenv/src/Dotenv.php:83
Stack trace:
#0 /home/foo/www/lorem/ipsum/backend/craft(16): Dotenv\Dotenv::create('/home/foo/...')
#1 {main}
thrown in /home/foo/www/lorem/ipsum/backend/vendor/vlucas/phpdotenv/src/Dotenv.php on line 83
Googling that error in combination with Craft CMS don't reveal many results. Some hint at version mismatch, but it's not clear which version is supposed to work. It's also confusing that it works on my local machine with the same PHP version, but not anymore on the remote server. I think I've tried most recommended fixes I could find.
Some more information (from composer.json):
"aelvan/imager": "^2.3",
"born05/craft-enforcepassword": "1.0.4.2",
"clubstudioltd/craft-asset-rev": "^6.0",
"codemonauts/craft-readonly-field": "1.0.2",
"craftcms/cms": "3.7.43",
"craftcms/redactor": "2.10.8",
"davist11/craft-reroute": "^2.0",
"doublesecretagency/craft-upvote": "2.2.2",
"mattgrayisok/craft-recently-viewed": "1.0.3",
"mildlygeeky/craft-kint": "^1.0",
"nesbot/carbon": "^2.32",
"pierrestoffe/craft-language-redirector": "2.0.0",
"sebastianlenz/linkfield": "1.0.25",
"solspace/craft-freeform": "3.13.10",
"studioespresso/craft-scout": "2.7.2",
"supercool/tablemaker": "2.0.1",
"thejoshsmith/craft-fab-permissions": "2.0.2",
"twentyfourhoursmedia/views-work": "1.3.0.7",
"verbb/super-table": "2.7.2",
"verbb/workflow": "1.7.3",
"vlucas/phpdotenv": "^5.4.0"
Does anyone have an idea what's going wrong here?