最好的方法开发一个作曲家包(关闭) - Best Way to Develop a Composer Package [closed]

- 此内容更新于:2016-02-03
主题:

我有一个大项目,我使用git作为风投。同时,我有一些模块,我能够在其他项目中使用。我想发布这些包作曲家。我将这些包存储在目录中。我不是推动供应商目录来投。我的问题从这里开始,有时我开发项目在同一时间的包。所以我需要“作曲家更新”等等……但是这种命令可以覆盖我的发展计划,或可能会导致其他一些问题。我不知道哪个是最好的方法来处理这两个项目和作曲家包在一起。

原文:

I have a large project, I'm using git as VCS. Also, I have some modules that I'm able to use in other projects. I want to publish these packages on composer. I'm storing these packages in the vendor directory. I'm not pushing the vendor directory to VCS.

My problem starts here, Some times I'm developing the project at the same time with the packages. So I need "composer update" etc... but this kind of command may overwrite my development package, or may cause some other problems.

I don't know which is the best way to handle both project and composer packages together.

网友:我建议将每个包放入git存储库。每个回购也必须包含一个作曲家文件描述了包。现在,在您的项目,你需要的包,他们会自动出现在你的供应商文件夹,安然无恙

(原文:I would suggest putting each package into git repositories. Each repo must also contain a composer file describing the package. Now, in your project, you can require the packages and they will automatically appear in your vendor folder, safe and sound)

网友:你需要使用它们在这个项目或多个项目吗?如果在多个,你怎么让他们更新在所有你的项目了吗?

(原文:Do you need to use them in this project or in multiple projects? If in multiple, how do you keep them up to date in all your projects now?)

网友:@Morten我这样做就像你说的,但做一个“作曲家更新”的时候写在我的插件,也删除。git插件文件。我需要重新设置。git设置。这是我的问题

(原文:@Morten I'm doing it like you said, but when do a "composer update" it over writes on my plugin, also it deletes .git files in plugins. Then I need to re set .git settings. This is my exact problem)

网友:你能进一步解释一下当前的设置吗?或者设置你在写评论了吗?@fobus

(原文:Can you explain further the current setup? Or the setup you had when writing the comment? @fobus)