作曲者:直接在供应商包中开发 [英] Composer: Develop directly in vendor packages

查看:113
本文介绍了作曲者:直接在供应商包中开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个PHP项目,我使用composer。

I have a PHP project where I use composer.

我自己的主库实际上是一个必需的包,因为我也正在构建一个独立版本人们安装(不只是图书馆),因此它在供应商目录中。

My own main library is actually a required package, as I'm also building a "standalone version" for people to install (not just the library), thus it lands in the vendor directory.

大多数时间我花费开发项目发生在该供应商包,这是一个Git克隆已经,但不是在任何分支。我可以通过运行 git checkout master 快速更改。但是,每次我运行 composer update 时,它或者抱怨目录是脏的,或者检出一个新的副本,我不得不在分支上启动一次。

Most of the time I spend developing the project happens in that vendor package, which is a Git clone already, however not on any branch. I can change that quickly enough by running git checkout master. However, every time I run composer update, it either complains about the directory being dirty, or checks out a new copy, where I have to start without being on a branch once more.

所以,我的问题:有一些模式为Composer例如只获取该repo中的更改?

So, my question: is there some mode for Composer to e.g. only fetch the changes in that repo? Or what would be the preferred way to develop (or just contribute to) a vendor package at the same time as developing the main package?

推荐答案

在开发主程序包的同时,开发(或只是贡献)

截至几分钟前,作曲家更新将询问您是要还原更改还是在包更新之前/之后执行存储/应用。这应该有助于解决这些问题,请参阅 https://github.com/composer/composer/pull/1188

As of a couple minutes ago composer updates will now ask you whether you want to revert the changes or do a stash/apply before/after the package update. This should help quite a bit with such problems, see https://github.com/composer/composer/pull/1188 for details.

这篇关于作曲者:直接在供应商包中开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆