drupal-composer / preserve-paths

A composer plugin for keeping specified files and directories when installing/updating new composer packages. Can be used to supported nested packages.
28 stars 28 forks source link

Handle null paths #45

Open lazysoundsystem opened 1 year ago

lazysoundsystem commented 1 year ago

A sticking plaster for the error in #43

jonpugh commented 1 year ago

Can we boost this fix?

The only way I can get composer install working on my project is to roll back composer to 2.5.5 or use this fork.

JonathanH-UK commented 1 year ago

I've hit this too.. +1 for merging the PR please

sandykadam commented 1 year ago

Please merge this and release this asap! PHP8 upgrade is stuck because of this error.

gargsuchi commented 1 year ago

Please merge this PR and create an official release. +1

vladdancer commented 1 year ago

Same thing for me. +1 for mergin PR.

lisotton commented 1 year ago

Same for me, +1 for merge this PR.

mxr576 commented 6 months ago

Null paths can be and probably should be handled at the source: \DrupalComposer\PreservePaths\PluginWrapper::getInstallPathsFromPackages()

diff --git a/src/PluginWrapper.php b/src/PluginWrapper.php
--- a/src/PluginWrapper.php 
+++ b/src/PluginWrapper.php (date 1710258587092)
@@ -136,6 +136,8 @@
             $paths[] = $installationManager->getInstallPath($package);
         }

+        $paths = array_filter($paths);
+
         return $this->absolutePaths($paths);
     }