【问题标题】:Symfony2 install phpDocumentorSymfony2 安装 phpDocumentor
【发布时间】:2014-01-21 18:30:19
【问题描述】:

我想将 phpdocumentor 安装到我的 Symfony 2.4 项目中,所以我在 composer.json 中添加了这两行:

"require": {
   //my old requires
   "phpdocumentor/template-abstract": "~1.2",
   "phpdocumentor/phpdocumentor": "2.1.*@dev"
}

当我执行 php composer.phar 更新时,出现以下错误:

 Problem 1
- phpdocumentor/template-abstract 1.2.1 requires ext-xsl * -> the requested PHP extension xsl is missing from your system.
- phpdocumentor/template-abstract 1.2 requires ext-xsl * -> the requested PHP extension xsl is missing from your system.
- Installation request for phpdocumentor/template-abstract ~1.2 -> satisfiable by phpdocumentor/template-abstract[1.2, 1.2.1].

虽然我在我的 php 扩展中安装了 php_xsl?!! 谢谢。

【问题讨论】:

  • 启用了 php_xsl 扩展的 php.ini 文件的位置是什么?有时网络服务器使用与 composer 不同的 php.ini,因此您可以为您的网站启用扩展(即显示在 phpinfo() 中)但不能用于命令行。
  • 感谢您的回复,我在本地机器上工作,我安装了 wampserver 2.4,并从其图形界面激活了 php_xsl。
  • 启用 WAMP 并不一定意味着它已启用作曲家。查看stackoverflow.com/questions/16372888/…stackoverflow.com/questions/16372888/…
  • 对不起,我做了主题中提到的事情:(将所有 icu* 复制到我的 apache bin 文件夹)但我有同样的问题!!!
  • php -m | grep xslphp -i | grep ini 的输出是什么?将php.ini 文件的位置与您在从您的网络服务器访问带有phpinfo() 的php 文件时看到的位置进行比较。

标签: php symfony composer-php phpdocumentor2


【解决方案1】:

好的,我刚刚回答了这个here.. 不妨解释一下。

基本上,您还需要在 PHP CLI 使用的 php.ini 文件中启用扩展,因为这是 composer 在命令行上运行时使用的扩展。

(我的地址是:C:\wamp\bin\php\php5.4.12\php.ini

祝你好运。

【讨论】:

    【解决方案2】:

    @Mohamed:几天前我遇到了同样的问题,但是当我尝试以下命令时它成功运行。这将更新您的 composer.phar 文件。

    php composer.phar self-update
    

    【讨论】:

    猜你喜欢
    • 2013-04-06
    • 2013-12-29
    • 2014-02-13
    • 2012-05-07
    • 2014-06-09
    • 2021-11-10
    • 2015-08-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多