将 symfony 2.0 升级到 2.1 加载 symfony 包时出错
upgrade symfony 2.0 to 2.1 error to load symfony package
我在 运行 composer.phar 安装时出现此错误 :
[RuntimeException]
Could not load package symfony/framework-standard-edition in http://packagist.org: [UnexpectedValueException] Could not parse version constraint ^2.4.8: Invalid version string "^2.4.8"
我使用 composer 1.0.0-alpha7,我正在将我的 symfony 项目 2.0 升级到 2.1
这是我的 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.1.*"
},
"scripts": {
"post-install-cmd": [
"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": [
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
]
},
"minimum-stability": "dev",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install":"symlink"
}
}
你有想法吗?
您必须 运行 composer selfupdate
,因为您使用的 Composer 版本尚不支持版本限制中的 ^
运算符。
好的,我发现我的问题了:我只是删除了我的 composer.json
的 "minimum-stability": "dev"
我在 运行 composer.phar 安装时出现此错误 :
[RuntimeException] Could not load package symfony/framework-standard-edition in http://packagist.org: [UnexpectedValueException] Could not parse version constraint ^2.4.8: Invalid version string "^2.4.8"
我使用 composer 1.0.0-alpha7,我正在将我的 symfony 项目 2.0 升级到 2.1
这是我的 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.1.*"
},
"scripts": {
"post-install-cmd": [
"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": [
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile"
]
},
"minimum-stability": "dev",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install":"symlink"
}
}
你有想法吗?
您必须 运行 composer selfupdate
,因为您使用的 Composer 版本尚不支持版本限制中的 ^
运算符。
好的,我发现我的问题了:我只是删除了我的 composer.json
的 "minimum-stability": "dev"