Composer

Undocumented trick to make Composer copy a local package repository

Submitted by Darren Oh on

I needed to test a Drupal module I was working on in a Docker container. The code was not in a location accessible to Docker. I tried to use Composer to copy it over. This would have worked if the code contained a composer.json file. I could have used a Composer path repository with symlink set to false. But it did not contain a composer.json file, so I had to use a Composer package repository. Composer kept symlinking instead of copying.

How to globally install Composer packages with conflicting dependencies

Submitted by Darren Oh on

Composer treats all globally installed packages as a single project with shared libraries. It cannot install multiple versions of the same library to meet the requirements of different packages. However, the cgr command can globally install composer packages with conflicting requirements. You install it as a composer package.

Tags