duanbenzan4050 2014-08-21 14:14
浏览 107
已采纳

Composer关闭了classmap autoload的生成

I'm working on a project which contains couple of parts written in different languages. One of these parts is a PHP application. When distributing the project there is a phase to distrib this PHP app. I use Phing for that. So apart from other dependencies, I have

"require": {
  "php": ">=5.3.13",
  "phing/phing": "2.7.*"
}

As composer.json in Phing package suggests, Composer creates autoload_classmap entries for Phing. There are some Phing targets that copy vendor libraries further, but they don't copy Phing itself (it's not a runtime dependency for PHP project itself). As a consequence, there are many entries in autoload_classmap that are problematic. My application itself uses classmaps so I want to use the mechanism but not for all packages.

Is it possible to suppress generation of classmap entries on a per package basis ?

  • 写回答

1条回答 默认 最新

  • douwen1006 2014-08-21 22:24
    关注

    This is probably a hen-and-egg problem, but I think Phing does not belong into the softwares dependencies, so it has to be taken out. Problem with the classmap solved.

    Where does it belong? It is infrastructure you have to install to deploy or distribute the software. Phing should be installed on the machine executing the deployment, or anywhere else where it is needed, but this is part of the infrastructure requirement for this machine.

    You can use Composer to install Phing globally (it's way better than using PEAR for this). Or you can create a deployment project that includes Phing, probably other stuff, and has the task to deploy/distribute that software.

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

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料