抱歉我的英文。
我正在尝试在我的Symfony应用程序中安装elastica-bundle,我收到以下错误: friendsofsymfony / elastica-bundle 3.1.0需要~2.1 - >可以通过symfony / form [2.1.x-dev,2.2.x-dev,.... symfony / form满足,但这些与您的要求或最小稳定性相冲突。
我的composer.json要求是:
"require": {
"php": ">=5.5.9",
"symfony/symfony": "^3.0",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"friendsofsymfony/user-bundle": "~2.0@dev",
"knplabs/knp-paginator-bundle": "^2.5",
"symfony/assetic-bundle": "^2.7",
"gedmo/doctrine-extensions": "dev-master",
"twbs/bootstrap": "^3.3",
"components/jquery": "^2.1",
"twig/extensions": "^1.3",
"friendsofsymfony/jsrouting-bundle": "dev-master",
"symfony/finder": "^3.0",
"symfony/serializer": "^3.0",
"symfony/form": "^3.1",
"symfony/console": "=2.8.6",
"symfony/property-access": "^3.1",
"ruflin/elastica": "^3.2",
"psr/log": "^1.0"
},
和我的AppKernel.php
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new \UPD\UserBundle\UserBundle(),
new \FOS\UserBundle\FOSUserBundle(),
new \Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
new \Symfony\Bundle\AsseticBundle\AsseticBundle(),
new AppBundle\AppBundle(),
);
我不明白问题出在哪里,因为symfony / form安装的版本较高。
有人可以帮帮我吗?谢谢大家,我很新手。
答案 0 :(得分:1)
消息Class
表示Elastica捆绑包至少需要Symfony 2.1,但始终是2.XX版本。
friendsofsymfony/elastica-bundle 3.1.0 requires ~2.1
运算符是Composer的最佳实践,但是由于它,许多流行的bundle与Symfony 3.0“仅”兼容。
目前尚未发布与Elastica Bundle兼容的SF3.0版本
3.2将是,因此您可以添加到~
临时:
composer.json
希望您的项目不会立即生效,因为它仍然是开发版!
WCS场景,选择一个提交,测试一切都在那里,然后做:
"friendsofsymfony/elastica-bundle": "dev-master as 3.2"