Browse Source

Warn about require-dev not being ignored when an update --no-dev fails to resolve dependencies, fixes #6575

Jordi Boggiano 7 years ago
parent
commit
acdb7638a8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/Composer/Installer.php

+ 3 - 0
src/Composer/Installer.php

@@ -473,6 +473,9 @@ class Installer
         } catch (SolverProblemsException $e) {
             $this->io->writeError('<error>Your requirements could not be resolved to an installable set of packages.</error>', true, IOInterface::QUIET);
             $this->io->writeError($e->getMessage());
+            if ($this->update && !$this->devMode) {
+                $this->io->writeError('<warning>Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.</warning>', true, IOInterface::QUIET);
+            }
 
             return array(max(1, $e->getCode()), array());
         }