简体   繁体   中英

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.

The dependencies are symfony bundles and not able to use as standalone.

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. 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. See https://getcomposer.org/doc/05-repositories.md#path for details on how to use that.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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