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. With the help of GitHub Copilot, I learned that for Composer package repositories, the symlink option is set in transport-options. This was not documented, so I created a page on drupal.org with a full explanation: Disabling symlinks for local Composer package repositories