简体   繁体   English

在项目中编辑自己的作曲家依赖项的最佳方法是什么?

[英]What is the best way to edit your own composer dependencies in a project?

I have a symfony project with a few dependencies created by myself, i use these dependencies as VNC in a lot of projects. 我有一个symfony项目,该项目有一个由我自己创建的依赖项,在很多项目中我都将这些依赖项用作VNC。

The dependencies are symfony bundles and not able to use as standalone. 依赖项是symfony捆绑包,不能独立使用。

What's the best way to edit these dependencies? 编辑这些依赖项的最佳方法是什么? Since i have to see the changes and test if it works well. 由于我必须查看更改并测试它是否工作良好。

At the moment i browse to the vendor directory to the target dependency, edit some stuff, see if its right in my development version and commit this change from the vendor directory. 现在,我浏览到目标依赖项的供应商目录,编辑一些内容,查看其在我的开发版本中是否正确,然后从供应商目录中提交此更改。

I feel there is a better way! 我觉得有更好的方法! My zend studio doesnt like this way. 我的zend工作室不喜欢这种方式。 It keeps building and building. 它不断建设。

Is there a better way? 有没有更好的办法?

Editing from vendor dir is OK in my opinion. 我认为可以从供应商目录进行编辑。 It's a valid way but maybe not always the most ideal. 这是一种有效的方法,但可能并不总是最理想的。

An alternative is to use the Composer PathRepository to load a local clone of your dependency into your project. 一种替代方法是使用Composer PathRepository将依赖项的本地克隆加载到项目中。 See https://getcomposer.org/doc/05-repositories.md#path for details on how to use that. 有关如何使用它的详细信息,请参见https://getcomposer.org/doc/05-repositories.md#path

And BTW if the path repo is your thing, Studio is a tool that can help you work with them in a more systematic manner, see https://github.com/franzliedke/studio 顺便说一句,如果您需要路径回购,Studio是可以帮助您以更系统的方式与他们合作的工具,请参阅https://github.com/franzliedke/studio

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM