dtv55860 2018-10-12 19:38
浏览 26
已采纳

Composer供应商在另一个供应商文件夹中安装

Let's say I have two packages package and package-extensions. So let's say package upon install, goes to /vendor/package/src. This package will have something like /vendor/package/src/replace.php.

Next, I want to install package-extensions such that it replaces /vendor/package/src/replace.php file.

Is that possible?

  • 写回答

1条回答 默认 最新

  • duandi2853 2018-10-12 20:45
    关注

    AFAIK you can't, but you can add to the composer.json a post-install event script to do it.

    https://getcomposer.org/doc/articles/scripts.md#installer-events

    Unfortunately, you'll have to add the post-install script in the compsoser.json of the project using package and package-extension. It won't work if you add the script in the composer.json of package-extension because composer doesn't run the event scripts of the dependencies.

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

报告相同问题?

悬赏问题

  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥15 python爬取bilibili校园招聘网站
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件
  • ¥15 不同系统编译兼容问题
  • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?
  • ¥30 数字电源对DSP芯片的具体要求
  • ¥20 antv g6 折线边如何变为钝角
  • ¥30 如何在Matlab或Python中 设置饼图的高度
  • ¥15 nginx中的CORS策略应该如何配置