preserve-paths icon indicating copy to clipboard operation
preserve-paths copied to clipboard

Handle null paths

Open lazysoundsystem opened this issue 1 year ago • 7 comments

A sticking plaster for the error in #43

lazysoundsystem avatar May 25 '23 12:05 lazysoundsystem

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.

jonpugh avatar Jun 27 '23 12:06 jonpugh

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

JonathanH-UK avatar Jul 04 '23 23:07 JonathanH-UK

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

sandykadam avatar Jul 25 '23 13:07 sandykadam

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

gargsuchi avatar Aug 14 '23 03:08 gargsuchi

Same thing for me. +1 for mergin PR.

vladdancer avatar Sep 05 '23 08:09 vladdancer

Same for me, +1 for merge this PR.

lisotton avatar Sep 07 '23 12:09 lisotton

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);
     }

mxr576 avatar Mar 13 '24 07:03 mxr576