preserve-paths
preserve-paths copied to clipboard
Error on 'null' paths for metapackages
A recent change in composer - https://github.com/composer/composer/pull/11455 - now breaks preserve-paths
when it deals with metapackages.
Error: Composer\Util\Filesystem::isAbsolutePath(): Argument #1 ($path) must be of type string, null given, called in .../vendor/drupal-composer/preserve-paths/src/PluginWrapper.php on line 190
See also https://github.com/laminas/laminas-component-installer/issues/69
Reproduction case in #42 reproduces this every time.
Confirming that, as suggested in https://github.com/drupal-composer/preserve-paths/issues/44, sticking with composer version 2.5.5 avoids this issue until this package is updated.
Workaround using lazysoundsystem's repo:
"repositories": {
"preserve-paths-fix": {
"type": "vcs",
"url": "https://github.com/lazysoundsystem/preserve-paths",
"only": ["drupal-composer/preserve-paths"]
},
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
}
},
"require": {
"drupal-composer/preserve-paths": "dev-master",
[etc]
}
Thank you for the commit 🧁
You can use this updated package https://github.com/sandykadam/preserve-paths/releases/tag/0.4 to fix