From 467c6a60c09644018b1b2874e01e9b9b372adf45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Hochd=C3=B6rfer?= Date: Fri, 9 May 2014 11:59:38 +0200 Subject: [PATCH] Making sure that the single package handling logic works if requires are defined in the configuration file. --- src/Composer/Satis/Command/BuildCommand.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Composer/Satis/Command/BuildCommand.php b/src/Composer/Satis/Command/BuildCommand.php index 0b1f1678..2694cc3c 100644 --- a/src/Composer/Satis/Command/BuildCommand.php +++ b/src/Composer/Satis/Command/BuildCommand.php @@ -251,6 +251,15 @@ private function selectPackages(Composer $composer, OutputInterface $output, $ve } } else { $links = array_values($composer->getPackage()->getRequires()); + + // only pick up packages in our filter, if a filter has been set. + if (count($packagesFilter) > 0) { + $links = array_filter($links, function(Link $link) use ($packagesFilter) { + return in_array($link->getTarget(), $packagesFilter); + }); + } + + $links = array_values($links); }