diff --git a/doc/04-schema.md b/doc/04-schema.md index 2f68fa67f..0e08f9896 100644 --- a/doc/04-schema.md +++ b/doc/04-schema.md @@ -316,12 +316,12 @@ Example: } ``` -> **Note:** While this is convenient at times, it should not be how you use -> packages in the long term because it comes with a technical limitation. The +> **Note:** This feature has severe technical limitations, as the > composer.json metadata will still be read from the branch name you specify -> before the hash. Because of that in some cases it will not be a practical -> workaround, and you should always try to switch to tagged releases as soon -> as you can. +> before the hash. You should therefore only use this as a temporary solution +> during development to remediate transient issues, until you can switch to +> tagged releases. The Composer team does not actively support this feature +> and will not accept bug reports related to it. It is also possible to inline-alias a package constraint so that it matches a constraint that it otherwise would not. For more information [see the diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index f83f9fd74..6555c8be4 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -179,7 +179,7 @@ EOT if ($input->getOption('latest')) { $latestPackage = $this->findLatestPackage($package, $composer, $phpVersion); } - $this->printMeta($package, $versions, $installedRepo, $latestPackage); + $this->printMeta($package, $versions, $installedRepo, $latestPackage ?: null); $this->printLinks($package, 'requires'); $this->printLinks($package, 'devRequires', 'requires (dev)'); if ($package->getSuggests()) { diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index 49e82f06c..b0c4756c9 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -459,7 +459,6 @@ class Installer $solver = new Solver($policy, $pool, $installedRepo, $this->io); try { $operations = $solver->solve($request, $this->ignorePlatformReqs); - $this->eventDispatcher->dispatchInstallerEvent(InstallerEvents::POST_DEPENDENCIES_SOLVING, $this->devMode, $policy, $pool, $installedRepo, $request, $operations); } catch (SolverProblemsException $e) { $this->io->writeError('Your requirements could not be resolved to an installable set of packages.', true, IOInterface::QUIET); $this->io->writeError($e->getMessage()); @@ -467,12 +466,14 @@ class Installer return array(max(1, $e->getCode()), array()); } - $this->io->writeError("Analyzed ".count($pool)." packages to resolve dependencies", true, IOInterface::VERBOSE); - $this->io->writeError("Analyzed ".$solver->getRuleSetSize()." rules to resolve dependencies", true, IOInterface::VERBOSE); - // force dev packages to be updated if we update or install from a (potentially new) lock $operations = $this->processDevPackages($localRepo, $pool, $policy, $repositories, $installedRepo, $lockedRepository, 'force-updates', $operations); + $this->eventDispatcher->dispatchInstallerEvent(InstallerEvents::POST_DEPENDENCIES_SOLVING, $this->devMode, $policy, $pool, $installedRepo, $request, $operations); + + $this->io->writeError("Analyzed ".count($pool)." packages to resolve dependencies", true, IOInterface::VERBOSE); + $this->io->writeError("Analyzed ".$solver->getRuleSetSize()." rules to resolve dependencies", true, IOInterface::VERBOSE); + // execute operations if (!$operations) { $this->io->writeError('Nothing to install or update'); diff --git a/src/Composer/Package/Archiver/ArchiveManager.php b/src/Composer/Package/Archiver/ArchiveManager.php index 3ff3f2e98..52fe7bed3 100644 --- a/src/Composer/Package/Archiver/ArchiveManager.php +++ b/src/Composer/Package/Archiver/ArchiveManager.php @@ -164,7 +164,7 @@ class ArchiveManager $filesystem->ensureDirectoryExists(dirname($tempTarget)); $archivePath = $usableArchiver->archive($sourcePath, $tempTarget, $format, $package->getArchiveExcludes()); - rename($archivePath, $target); + $filesystem->rename($archivePath, $target); // cleanup temporary download if (!$package instanceof RootPackageInterface) {