根据 github 示例,无法安装/需要 ongr/elasticsearch-bundle "~5.0"。
我正在全新安装最新的 symfony。
我正在运行以下命令: composer require ongr/elasticsearch-bundle "~5.0"
根据https://github.com/ongr-io/ElasticsearchBundle
composer require ongr/elasticsearch-bundle "~5.0"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.2.*"
Package operations: 7 installs, 0 updates, 0 removals
- Installing react/promise (v2.7.1): Loading from cache
- Installing guzzlehttp/streams (3.0.0): Loading from cache
- Installing guzzlehttp/ringphp (1.1.1): Loading from cache
- Installing elasticsearch/elasticsearch (v5.5.0): Loading from cache
- Installing ongr/elasticsearch-dsl (v5.0.6): Loading from cache
- Installing symfony/templating (v4.2.11): Loading from cache
- Installing ongr/elasticsearch-bundle (v5.2.4): Loading from cache
Writing lock file
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
Symfony operations: 1 recipe (c91982d16a3859d0a43fd4ff85aa437a)
- Configuring ongr/elasticsearch-bundle (>=v5.2.4): From auto-generated recipe
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! In ArrayNode.php line 228:
!!
!! The child node "managers" at path "ongr_elasticsearch" must be configured.
!!
!!
!!
Script @auto-scripts was called via post-update-cmd
Installation failed, reverting ./composer.json to its original content.
我能做些什么来解决这个问题?
本教程提到了一个 config.yml (我没有),我假设如果它在安装过程中不存在,则会创建它