正在尝试通过作曲家安装小部件和表单模块。但是我都会遇到一些错误。
有什么问题?
无法扫描" CMS//tests/behat/"
中的课程
$ composer require silverstripe/widgets
Using version ^1.2 for silverstripe/widgets
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing silverstripe/widgets (1.2.2)
Downloading: 100%
Writing lock file Generating autoload files
Installation failed, reverting ./composer.json to its original content.
[RuntimeException] Could not scan for classes inside "cms//tests/behat/" which does not appear to be a file nor a folder
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...
看起来作曲家的自动装载机期望看到一个不存在的behat目录结构。查看这篇文章的一个类似问题,该解决方案是删除任何预先安装的模块并重新运行的composer update
。如果这是您的开发环境,则还可以删除"供应商"目录,并根据需要重新运行composer update
或composer install
。