donglang1894 2015-02-02 19:43
浏览 34
已采纳

将pear / xml_parser添加到composer.json

I'm trying to include pear/xml_serializer in my Laravel project. So, in the composer.json file I do

"repositories": {
    "phppear": {
        "type": "pear",
        "url": "http://pear.php.net"
    }
},

To load the repo, and then I include it in the require section like this:

"require": {
    ...
    "pear/xml_serializer": "dev-master"
},

And that works fine. The issue is that this package requires pear/xml_parser, but doing

"require": {
    ...
    "pear/xml_parser": "dev-master",
    "pear/xml_serializer": "dev-master"
},

Doesn't work. Neither does xml_parser2. I get this error:

The requested package pear/xml_parser2 could not be found in any version, there may be a typo in the package name.

I have to assume that means it can't find the package, but I can't figure out how to load it. I've tried several different variations of the commands above. The packages are here:

http://pear.php.net/package/xml_serializer http://pear.php.net/package/xml_parser2

But only the first one can be found? Do I need to get the xml_parser from somewhere else?

Thanks for the help.

  • 写回答

1条回答 默认 最新

  • dotxxh0998 2015-02-02 19:55
    关注

    Please give this a try:

    {
        "require": {
            "pear-pear.php.net/xml_parser": "*",
            "pear-pear.php.net/xml_serializer": "*"
        },
        "repositories": [
            {
                "type": "pear",
                "url": "http://pear.php.net"
            }
        ]
    }
    

    Results in:

     ...
      - Installing pear-pear.php.net/xml_parser (1.3.4)
      - Installing pear-pear.php.net/xml_serializer (0.20.2)
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 用twincat控制!
  • ¥15 请问一下这个运行结果是怎么来的
  • ¥15 单通道放大电路的工作原理
  • ¥30 YOLO检测微调结果p为1
  • ¥20 求快手直播间榜单匿名采集ID用户名简单能学会的
  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决