I have updated my laravel project to "laravel/framework": "^8.12"
from laravel 5.7, but after updating when I run composer dump-autoload
it returns this error
Generating optimized autoload files> IlluminateFoundationComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
In TestDatabases.php line 148:
syntax error, unexpected ')'
here is my composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"intervention/image": "^2.5",
"laravel/framework": "^8.12",
"laravel/sanctum": "^2.8",
"laravel/tinker": "^2.5",
"laravel/ui": "^2.0",
"barryvdh/laravel-dompdf": "^0.8.3",
"nao-pon/flysystem-google-drive": "~1.1",
"spatie/laravel-backup": "^6.14"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\": "app/",
"Database\Factories\": "database/factories/",
"Database\Seeders\": "database/seeders/"
},
"files": [
"app/Helpers/helpers.php",
"app/Helpers/agent_helper.php",
"app/Helpers/user-helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}
how to solve this error?
question from:
https://stackoverflow.com/questions/66061548/syntax-error-unexpected-after-laravel-update 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…