Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen:
Converting a Composer dependency to git for editing
Oct 04, 2017 @ 09:50:40

Rob Allen has a quick post to his site that could help out Composer users when they need to transition to a git copy of a repository rather than an export.

I'm adding a new feature to ZF's Problem-Details component and it's easiest to do this within the context of the application I'm developing.

The component lives in vendor/zendframework/zend-problem-details and was installed using composer require so doesn't have its own git repository as the distribution zip file was used to install it.

He shows how to use the built-in --prefer-source option for Composer to pull down a clone of the repository rather than the copy. This allows you do develop right in the same environment without having to re-clone the repository somewhere else and work from there.

tagged: composer git clone source preference

Link: https://akrabat.com/converting-a-composer-dependency-to-git-for-editing/