我一直在我的本地机器上使用Symfony 2.1做一个项目。我已经将其上传到我的服务器上,但是当我尝试使用Composer安装供应商捆绑包时,我收到了许多依赖错误。这可能与Symfony刚刚发布的最新版本有关,而我的composer.json
文件没有指定确切的版本号。
有没有什么方法可以让我快速显示本地机器上所有东西的版本号?
下面是我的composer.json文件(几天前它还运行得很好):
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.0.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.1.*",
"symfony/swiftmailer-bundle": "2.1.*",
"symfony/monolog-bundle": "2.1.*",
"sensio/distribution-bundle": "2.1.*",
"sensio/framework-extra-bundle": "2.1.*",
"sensio/generator-bundle": "2.1.*",
"jms/security-extra-bundle": "1.2.*",
"jms/di-extra-bundle": "1.1.*",
"sonata-project/admin-bundle": "*",
"sonata-project/cache-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"stof/doctrine-extensions-bundle": "1.1.x-dev",
"sonata-project/user-bundle": "dev-master",
"sonata-project/easy-extends-bundle": "dev-master",
"friendsofsymfony/user-bundle": "2.0.x-dev",
"friendsofsymfony/jsrouting-bundle": "*",
"liip/imagine-bundle": "*",
"simplethings/form-extra-bundle": "dev-master",
"antimattr/google-bundle": "dev-master",
"doctrine/doctrine-fixtures-bundle": "dev-master",
"genemu/form-bundle": "2.1.*",
"behat/behat": "2.4.*@stable",
"behat/mink": "1.4.*@stable",
"behat/symfony2-extension": "*@stable",
"behat/mink-extension": "*@stable",
"behat/mink-selenium2-driver": "*@stable",
"behat/mink-browserkit-driver": "*",
"liip/functional-test-bundle": "dev-master"
},
"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"
},
"config": {
"bin-dir": "bin/"
}
}
发布于 2013-03-03 21:29:21
您可以运行composer show -i
(--installed
的缩写)。
在最新版本中只需使用composer show
即可。
-i
选项已弃用。
您还可以使用composer:composer global show
的global
安装
发布于 2015-01-03 19:01:09
要列出全局安装的composer软件包:
composer global show -i
发布于 2016-06-18 20:47:34
如果你只想检查一个版本,你可以这样做
composer show -- twig/twig
请注意,现在默认情况下只显示已安装的软件包,并且已弃用已安装的选项。
https://stackoverflow.com/questions/15185459
复制相似问题