Sylius 全新安装:无法安装 "sensio/generator-bundle"?
Sylius Fresh Installation: can't install "sensio/generator-bundle"?
我是 Sylius 的新手,我刚刚在我的 Mac 上安装了一个新的 Sylius 项目,它工作正常。然后我意识到我需要在 src 下创建我自己的包来覆盖 Sylius 包。通常,我会使用 "php app/console generate:bundle" 来生成一个 bundle skeleton,但是 "sensio/generator-bundle" 没有与默认的 Sylius 项目集成,所以我需要先通过 composer 安装它,但似乎我做不到由于依赖错误,下面是错误结果
Problem 1
- Conclusion: don't install sensio/generator-bundle v2.5.1
- Installation request for sensio/generator-bundle ~2.5 -> satisfiable by sensio/generator-bundle[v2.5.0, v2.5.1].
- Conclusion: remove symfony/symfony v2.3.25
- sensio/generator-bundle v2.5.0 requires symfony/console ~2.5 -> satisfiable by symfony/symfony[v2.5.0, v2.5.1, v2.5.10, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.2, v2.6.3, v2.6.4], symfony/console[v2.5.0, v2.5.1, v2.5.10, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.2, v2.6.3, v2.6.4].
- don't install symfony/console v2.5.0|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.1|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.10|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.2|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.3|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.4|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.5|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.6|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.7|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.8|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.9|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.0|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.1|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.2|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.3|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.4|don't install symfony/symfony v2.3.25
- Can only install one of: symfony/symfony[v2.5.0, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.1, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.10, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.2, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.3, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.4, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.5, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.6, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.7, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.8, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.9, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.0, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.1, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.2, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.3, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.4, v2.3.25].
- Installation request for symfony/symfony == 2.3.25.0 -> satisfiable by symfony/symfony[v2.3.25].
下面是我的composer.json(全新安装)
{
"name": "sylius/sylius-standard",
"description": "Sylius SE, modern e-commerce solution for Symfony2",
"keywords": ["symfony", "symfony2", "sylius", "distribution", "ecommerce", "cart"],
"type": "project",
"license": "MIT",
"homepage": "http://sylius.org",
"authors": [
{
"name": "Paweł Jędrzejewski",
"homepage": "http://pjedrzejewski.com"
},
{
"name": "Sylius project",
"homepage": "http://sylius.org"
},
{
"name": "Community contributions",
"homepage": "http://github.com/Sylius/Sylius/contributors"
}
],
"require": {
"php": ">=5.3.3",
"sylius/sylius": "0.12.*@dev",
"doctrine/doctrine-bundle": "@dev",
"doctrine/migrations": "@dev",
"doctrine/doctrine-migrations-bundle": "@dev",
"friendsofsymfony/user-bundle": "@dev",
"knplabs/knp-gaufrette-bundle": "@dev",
"knplabs/knp-snappy-bundle": "@dev",
"liip/doctrine-cache-bundle": "@dev",
"mathiasverraes/money": "@dev",
"pagerfanta/pagerfanta": "@dev",
"white-october/pagerfanta-bundle": "@dev",
"friendsofsymfony/oauth-server-bundle": "@dev",
"willdurand/hateoas-bundle": "1.0.*@dev",
"jms/serializer-bundle": "0.13.*@dev",
"friendsofsymfony/rest-bundle": "~1.5@dev"
},
"require-dev": {
"behat/behat": "~3.0",
"behat/symfony2-extension": "~2.0@dev",
"behat/mink-extension": "~2.0@dev",
"behat/mink-browserkit-driver": "~1.2@dev",
"behat/mink-selenium2-driver": "@dev",
"behat/mink": "~1.6@dev",
"doctrine/doctrine-fixtures-bundle": "2.2.*",
"fzaninotto/faker": "~1.2",
"phpspec/phpspec": "~2.0",
"phpunit/phpunit": "~3.7"
},
"scripts": {
"post-install-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile",
"Symfony\Cmf\Bundle\CreateBundle\Composer\ScriptHandler::downloadCreate"
],
"post-update-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile",
"Symfony\Cmf\Bundle\CreateBundle\Composer\ScriptHandler::downloadCreate"
]
},
"autoload": {
"psr-0": {
"": "src/",
"Context": "features/"
}
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
}
}
是否可以安装生成器包或者是否有其他创建包的方法?
谢谢
这是错误信息中重要的一行:sensio/generator-bundle v2.5.0 requires symfony/console ~2.5 其次是 结论:移除 symfony/symfony v2.3.25
这意味着:(a) 您安装了 Symfoy 2.3.25 并且 (b) 您需要一个至少需要 Symfony 2.5 的 SensioGeneratorBundle 版本。
您可以通过两种方式解决:
- 将 Symfony 版本限制提高到
~2.5
- 需要与 Symfony 2.3 兼容的 SensioGeneratorBundle 版本。
我是 Sylius 的新手,我刚刚在我的 Mac 上安装了一个新的 Sylius 项目,它工作正常。然后我意识到我需要在 src 下创建我自己的包来覆盖 Sylius 包。通常,我会使用 "php app/console generate:bundle" 来生成一个 bundle skeleton,但是 "sensio/generator-bundle" 没有与默认的 Sylius 项目集成,所以我需要先通过 composer 安装它,但似乎我做不到由于依赖错误,下面是错误结果
Problem 1
- Conclusion: don't install sensio/generator-bundle v2.5.1
- Installation request for sensio/generator-bundle ~2.5 -> satisfiable by sensio/generator-bundle[v2.5.0, v2.5.1].
- Conclusion: remove symfony/symfony v2.3.25
- sensio/generator-bundle v2.5.0 requires symfony/console ~2.5 -> satisfiable by symfony/symfony[v2.5.0, v2.5.1, v2.5.10, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.2, v2.6.3, v2.6.4], symfony/console[v2.5.0, v2.5.1, v2.5.10, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.2, v2.6.3, v2.6.4].
- don't install symfony/console v2.5.0|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.1|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.10|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.2|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.3|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.4|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.5|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.6|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.7|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.8|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.9|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.0|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.1|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.2|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.3|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.4|don't install symfony/symfony v2.3.25
- Can only install one of: symfony/symfony[v2.5.0, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.1, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.10, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.2, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.3, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.4, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.5, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.6, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.7, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.8, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.9, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.0, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.1, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.2, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.3, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.4, v2.3.25].
- Installation request for symfony/symfony == 2.3.25.0 -> satisfiable by symfony/symfony[v2.3.25].
下面是我的composer.json(全新安装)
{
"name": "sylius/sylius-standard",
"description": "Sylius SE, modern e-commerce solution for Symfony2",
"keywords": ["symfony", "symfony2", "sylius", "distribution", "ecommerce", "cart"],
"type": "project",
"license": "MIT",
"homepage": "http://sylius.org",
"authors": [
{
"name": "Paweł Jędrzejewski",
"homepage": "http://pjedrzejewski.com"
},
{
"name": "Sylius project",
"homepage": "http://sylius.org"
},
{
"name": "Community contributions",
"homepage": "http://github.com/Sylius/Sylius/contributors"
}
],
"require": {
"php": ">=5.3.3",
"sylius/sylius": "0.12.*@dev",
"doctrine/doctrine-bundle": "@dev",
"doctrine/migrations": "@dev",
"doctrine/doctrine-migrations-bundle": "@dev",
"friendsofsymfony/user-bundle": "@dev",
"knplabs/knp-gaufrette-bundle": "@dev",
"knplabs/knp-snappy-bundle": "@dev",
"liip/doctrine-cache-bundle": "@dev",
"mathiasverraes/money": "@dev",
"pagerfanta/pagerfanta": "@dev",
"white-october/pagerfanta-bundle": "@dev",
"friendsofsymfony/oauth-server-bundle": "@dev",
"willdurand/hateoas-bundle": "1.0.*@dev",
"jms/serializer-bundle": "0.13.*@dev",
"friendsofsymfony/rest-bundle": "~1.5@dev"
},
"require-dev": {
"behat/behat": "~3.0",
"behat/symfony2-extension": "~2.0@dev",
"behat/mink-extension": "~2.0@dev",
"behat/mink-browserkit-driver": "~1.2@dev",
"behat/mink-selenium2-driver": "@dev",
"behat/mink": "~1.6@dev",
"doctrine/doctrine-fixtures-bundle": "2.2.*",
"fzaninotto/faker": "~1.2",
"phpspec/phpspec": "~2.0",
"phpunit/phpunit": "~3.7"
},
"scripts": {
"post-install-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile",
"Symfony\Cmf\Bundle\CreateBundle\Composer\ScriptHandler::downloadCreate"
],
"post-update-cmd": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile",
"Symfony\Cmf\Bundle\CreateBundle\Composer\ScriptHandler::downloadCreate"
]
},
"autoload": {
"psr-0": {
"": "src/",
"Context": "features/"
}
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
}
}
是否可以安装生成器包或者是否有其他创建包的方法?
谢谢
这是错误信息中重要的一行:sensio/generator-bundle v2.5.0 requires symfony/console ~2.5 其次是 结论:移除 symfony/symfony v2.3.25
这意味着:(a) 您安装了 Symfoy 2.3.25 并且 (b) 您需要一个至少需要 Symfony 2.5 的 SensioGeneratorBundle 版本。
您可以通过两种方式解决:
- 将 Symfony 版本限制提高到
~2.5
- 需要与 Symfony 2.3 兼容的 SensioGeneratorBundle 版本。