我最近安装了 symfony,它建议我获得一个叫做 INTL 扩展的东西......
我使用 Composer 安装 symfony 之后我想添加那个扩展,所以我在我的文件夹中打开 composer.json 并像这样添加 symfony/intl
"require": {
"symfony/intl": "2.3.*",
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"incenteev/composer-parameter-handler": "~2.0"
},
并使用了 Composer 更新,它提供了以下内容
******* path # composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Updating the "app/config/parameters.yml" file.
Clearing the cache for the dev environment with debug true
Installing assets using the hard copy option
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
Installing assets for Acme\DemoBundle into web/bundles/acmedemo
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodi
这意味着作曲家没有下载 lib 我删除了 Composer.lock 文件并运行 Composer Install 并且 composer 仍然不需要任何东西......
但有趣的是,当我转到一个空文件夹并使用“composer require”时,它工作并下载了 INTL!我认为作曲家的目标是在我想要它们时添加我想要的库,那么
问题是什么?为什么我不能添加新的库?