dpy3846 2018-10-16 13:17
浏览 74
已采纳

如何获得作曲家已知的PHP扩展名? [关闭]

I need to set up a composer.json with server requirements (eg. php >= 5.6, lib-xml, etc). There are some examples in composer documentation, but what i need is a method to get a composer alias (ext-xxx, lib-yyy, etc) for a given php extenstion or library (eg. php7.1-curl - Ubuntu package name).

  • 写回答

1条回答 默认 最新

  • doutuoji8418 2018-10-16 13:22
    关注

    Partial answer

    composer show -p
    

    Gives a list of extensions/libraries installed on the current system. So the solution is:

    1. On a local linux/unix, install the library/extension in question (eg. apt install php-curl)
    2. Filter the list of libraries recognized by composer to find the right result

      composer list -p | grep curl

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 开发一个小区生态的小程序
  • ¥15 MddBootstrapInitialize2失败
  • ¥15 LCD Flicker
  • ¥15 Spring MVC项目,访问不到相应的控制器方法
  • ¥15 esp32在micropython环境下使用ssl/tls连接mqtt服务器出现以下报错Connected on 192.168.154.223发生意外错误: 5无法连接到 MQTT 代理,如何解决?
  • ¥15 关于#genesiscsheel#的问题,如何解决?
  • ¥15 Android aidl for hal
  • ¥15 STM32CubeIDE下载程序报错
  • ¥15 微信好友如何转变为会员系统?(相关搜索:小程序)
  • ¥15 c# 直接使用c++ 类库文件