Just updated to Craft 4, migrated my /web
folder over as well as my /assets
folder and trying to load the index page gives me the following error.
Any help would be great as I can no longer access my /admin
Fatal error: Uncaught TypeError: Dotenv\Dotenv::create(): Argument #1 ($repository) must be of type Dotenv\Repository\RepositoryInterface, string given, called in /app/web/index.php on line 15 and defined in /app/vendor/vlucas/phpdotenv/src/Dotenv.php:83 Stack trace: #0 /app/web/index.php(15): Dotenv\Dotenv::create('/app') #1 {main} thrown in /app/vendor/vlucas/phpdotenv/src/Dotenv.php on line 83
My composer.json looks like the following:
{
"require": {
"craftcms/cms": "^4.2.0.2",
"craftcms/feed-me": "5.0.4",
"craftcms/redactor": "3.0.2",
"nystudio107/craft-seomatic": "4.0.7",
"nystudio107/craft-similar": "4.0.0",
"putyourlightson/craft-blitz": "4.2.1",
"putyourlightson/craft-sprig": "2.1.0",
"verbb/image-resizer": "3.0.1",
"verbb/wishlist": "2.0.0",
"vlucas/phpdotenv": "^5.4.0"
},
"require-dev": {
"yiisoft/yii2-shell": "^2.0.3"
},
"autoload": {
"psr-4": {
"modules\\": "modules/"
}
},
"config": {
"allow-plugins": {
"craftcms/plugin-installer": true,
"yiisoft/yii2-composer": true
},
"sort-packages": true,
"optimize-autoloader": true,
"platform": {
"php": "8.1.0"
}
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
]
}
}