Skip to content

Handle null paths - #45

Open
lazysoundsystem wants to merge 1 commit into
drupal-composer:masterfrom
lazysoundsystem:master
Open

Handle null paths#45
lazysoundsystem wants to merge 1 commit into
drupal-composer:masterfrom
lazysoundsystem:master

Conversation

@lazysoundsystem

Copy link
Copy Markdown

A sticking plaster for the error in #43

@jonpugh

jonpugh commented Jun 27, 2023

Copy link
Copy Markdown

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.

@colinstillwell colinstillwell left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem for me, would love to see this come in and become part of a stable release version.

@sandykadam

Copy link
Copy Markdown

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

@ivangrynenko ivangrynenko left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@gargsuchi

Copy link
Copy Markdown

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

@vladdancer

Copy link
Copy Markdown

Same thing for me. +1 for mergin PR.

@lisotton

lisotton commented Sep 7, 2023

Copy link
Copy Markdown

Same for me, +1 for merge this PR.

@mxr576

mxr576 commented Mar 13, 2024

Copy link
Copy Markdown

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

@niallfleming

Copy link
Copy Markdown

mxr576

Is there an example of how this should be achieved? What if I have no control of the source, but don't wish to fork it?

@sandykadam

Copy link
Copy Markdown

You can update and use mine fixed repo - composer require sandykadam/preserve-paths
https://github.com/sandykadam/preserve-paths

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.