PHP 有作曲家的 PHAR?

PHP PHARs with composer?

我一直在考虑将我的应用程序作为单个 PHAR 进行分发的优点和缺点。

不过,我仍然想使用 Composer 来管理我拥有的所有随机依赖项。这意味着如果内容发生变化,则写回 phar,我理解这充其量是一个复杂的过程。

最好的协调方式是什么?我应该简单地保持我的应用程序独立并让它与外部 /vendor 目录一起使用吗?

提前致谢!

考虑到 composer.phar file itself includes a few Symfony components, as well as some other libraries written by the author, and they are all put into the .phar file for distribution (including, explicitly, a number of vendor/ sub-directories),将您自己的项目所需的供应商目录也包含在内似乎并不合理。