我在安裝Sylius軟件包(即SyliusProductBundle)到一個新的Symfony 2.4問題安裝作曲家相關性錯誤時Sylius捆綁到Symfony的2.4
rm -rf * .gitignore .travis.yml
composer create-project symfony/framework-standard-edition ./ 2.4.* --prefer-dist
Symfony的安裝經歷沒有任何錯誤: 清除的緩存調試真實 使用硬拷貝選項安裝資產 將Symfony \ Bundle \ FrameworkBundle的資產安裝到web/bundles/framework 將Acme \ DemoBundle的資產安裝到web/bundles/acmedemo中 爲Sensio \ Bundle \ DistributionBundle安裝資產進入網絡/束/ sensiodistribution
在我們去,旁邊的安裝包 - 我們首先可以使用它在docs定律描述的方式:
composer require "sylius/product-bundle":"1.0.*@dev"
失敗:
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for sylius/product-bundle 1.0.*@dev -> satisfiable by sylius/product-bundle[1.0.x-dev].
- sylius/product-bundle 1.0.x-dev requires sylius/resource-bundle 1.0.*@dev -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
我已經試過幾件事情(包括安裝了Doctrine Bundle 1.3,導致更多的錯誤引用某些類丟失,因此未能清除緩存):
2.2751 19015200 9. require('-ABSOLUTE PATH HERE-vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/Command/Proxy/CollectionRegionDoctrineCommand.php') -ABSOLUTE PATH HERE-vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:120
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.
我讀過,它可能是我的配置問題,這就是爲什麼我確保系統時區設置正確,它的定義是。 我的設置如下: Mac OS X 10.9 MAMP免費使用PHP 5.4.10,安裝擴展包括XDebug和XCache 我在這一個運氣不好,並希望得到一個解決方案。
謝謝!
至於建議,我composer.json
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0"
},
"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"
],
"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"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.4-dev"
}
}
}
向我們展示composer.json –
嘿,composer.json是Symfony的默認設置 - 無論如何我都會將它添加到帖子中。謝謝! –
是否有任何具體原因試圖安裝bundle的'@ dev'版本?你真的需要在最新的'〜1.0'版本之後添加的東西嗎?否則解決方案將非常簡單...省略「@ dev」。 – nifr