-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
My composer.json
:
...snip...
"repositories": {
"acquia/blt": {
"type": "path",
"url": "/home/dane/packages/blt",
"options": {
"symlink": true
}
}
}
Output of composer diagnose
:
Checking composer.json: WARNING
require.drush/drush : unbound version constraints (dev-master || 10.x-dev || 9.x-dev || 9.5.x-dev) should be avoided
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.10.1
PHP version: 7.3 - Package overridden via config.platform (actual: 7.3.11)
PHP binary path: /usr/bin/php7.3
OpenSSL version: OpenSSL 1.1.1c 28 May 2019
When I run this command:
composer install
I get the following output:
...snip...
- Installing acquia/blt (dev-DT-1201): Symlinking from /home/dane/packages/blt
And I expected this to happen:
The package in question to actually be linked as /home/dane/packages/blt
. Instead, the package is linked using a relative path:
$ ls -al vendor/acquia/
drwxr-xr-x 2 dane dane 4096 Mar 18 18:27 .
drwxr-xr-x 60 dane dane 4096 Mar 18 18:27 ..
lrwxrwxrwx 1 dane dane 12 Mar 18 18:27 blt -> ../../../blt
It appears that Composer transforms the absolute path to a relative one if it shares any common parent directories. This is unexpected behavior IMHO, and creates problems that are difficult or impossible to work around. In my case, I'm using Composer to create a master test fixture that I want to clone elsewhere on my system as a testing sandbox, and that's impossible if the link is not absolute.
I'd like Composer to either maintain links as they are provided, or provide an argument/config to force them to be absolute.