Commit 50cbe65c authored by catch's avatar catch
Browse files

Issue #3532796 by alexpott, jurgenhaas, rkoller: Composer unpack plugin runs...

Issue #3532796 by alexpott, jurgenhaas, rkoller: Composer unpack plugin runs into issue when requiring a dev-release of a module

(cherry picked from commit a38e8d0f)
parent 84c6219a
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
use Composer\EventDispatcher\EventSubscriberInterface;
use Composer\Installer;
use Composer\IO\IOInterface;
use Composer\Package\Package;
use Composer\Package\PackageInterface;
use Composer\Plugin\Capability\CommandProvider;
use Composer\Plugin\Capable;
use Composer\Plugin\PluginInterface;
@@ -107,7 +107,7 @@ public function unpackOnRequire(Event $event): void {
          $packages = $composer->getRepositoryManager()->getLocalRepository()->findPackages($package_name);
          $package = reset($packages);

          if (!$package instanceof Package) {
          if (!$package instanceof PackageInterface) {
            if (!$isInstalling) {
              $event->getIO()->write('Recipes are not unpacked when the --no-install option is used.', verbosity: IOInterface::VERBOSE);
              return;
+2 −2
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
namespace Drupal\Composer\Plugin\RecipeUnpack;

use Composer\Command\BaseCommand;
use Composer\Package\Package;
use Composer\Package\PackageInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@@ -75,7 +75,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
      $packages = $local_repo->findPackages($package_name);
      $package = reset($packages);

      if (!$package instanceof Package) {
      if (!$package instanceof PackageInterface) {
        $io->error(sprintf('<info>%s</info> does not resolve to a package.', $package_name));
        return 1;
      }