Composer不会添加甚至下载添加的库

时间:2013-08-05 13:20:36

标签: php symfony composer-php

我最近安装了symfony,它建议我得到一个名为INTL extension ...

的东西

我之后使用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 update,它提供了以下内容

******* 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 require”时它工作并下载了INTL! 我认为作曲家的目标是在我想​​要的时候添加我想要的库 有什么问题 ?为什么我不能添加新的库?

1 个答案:

答案 0 :(得分:1)

Composer说你应该安装intl扩展名(ext-intl),然后它意味着php扩展,而不是symfony/intl(因为它仅限于en)。您应该删除该包并安装真正的扩展。在基于debian的系统(Ubuntu,...)上,它是包php5-intl

apt-get install php5-intl