Running composer in Laravel 5.4 error: RuntimeException
1. Run Composer in Laravel 5.4 and report an error: RuntimeException.[运行时异常]require-dev.mikey179/vfsstream is invalid and should not contain uppercase characters. Please use mikey179/vfsstrea instead. as shown in Figure 1
PS E:\wwwroot\msi_main> composer
[RuntimeException]
require-dev.mikey179/vfsStream is invalid, it should not contain uppercase characters. Please use mikey179/vfsstrea
m instead.
2. Check composer.json. Contains: “mikey179/vfsstream”: “v1.5.0”,.
"require-dev": {
"fzaninotto/faker": "~1.4",
"mikey179/vfsStream": "v1.5.0",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.7",
"squizlabs/php_codesniffer": "^3.0"
},
3. Check the URL:https://packagist.org/packages/mikey179/vfsstream. A virtual file system that simulates a real file system in unit tests.
4. Check composer.json. Modification: “mikey179/vfsstream”: “v1.5.0”,.
"require-dev": {
"fzaninotto/faker": "~1.4",
"mikey179/vfsstream": "v1.5.0",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.7",
"squizlabs/php_codesniffer": "^3.0"
},
5. Run composer again in Laravel 5.4, no more errors are reported. as shown in Figure 2
PS E:\wwwroot\msi_main> composer
______
/ ____/___ ____ ___ ____ ____ ________ _____
/ / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/
Composer version 2.0.12 2021-04-01 10:14:59
Usage:
command [options] [arguments]
![在 Laravel 5.4 中运行 composer 报错:RuntimeException。[运行时异常] require-dev.mikey179/vfsStream 无效,不应包含大写字符。请使用 mikey179/vfsstrea 来代替。](https://www.shuijingwanwq.com/wp-content/uploads/2021/09/1-5.png)
