在 Laravel 5.4 中运行 composer 报错:RuntimeException

1、在 Laravel 5.4 中运行 composer 报错:RuntimeException。[运行时异常] require-dev.mikey179/vfsStream 无效,不应包含大写字符。请使用 mikey179/vfsstrea 来代替。如图1

图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、查看 composer.json。包含:”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、查看网址:https://packagist.org/packages/mikey179/vfsstream 。在单元测试中模拟真实文件系统的虚拟文件系统。

4、查看 composer.json。修改:”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、在 Laravel 5.4 中再次运行 composer ,不再报错。如图2

图2

PS E:\wwwroot\msi_main> composer
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 2.0.12 2021-04-01 10:14:59

Usage:
  command [options] [arguments]
永夜