From 6da7cb667b75672618dec716e42671d8dd696d0a Mon Sep 17 00:00:00 2001 From: Geert Eltink Date: Sun, 13 Mar 2016 17:57:04 +0100 Subject: [PATCH 1/2] Use version constraint when adding a package --- src/ExpressiveInstaller/OptionalPackages.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ExpressiveInstaller/OptionalPackages.php b/src/ExpressiveInstaller/OptionalPackages.php index 7a2f227..b7e3729 100644 --- a/src/ExpressiveInstaller/OptionalPackages.php +++ b/src/ExpressiveInstaller/OptionalPackages.php @@ -319,8 +319,12 @@ public static function addPackage(IOInterface $io, $packageName, $packageVersion $packageVersion )); + // Get the version constraint + $versionParser = new VersionParser(); + $constraint = $versionParser->parseConstraints($packageVersion); + // Create package link - $link = new Link('__root__', $packageName, null, 'requires', $packageVersion); + $link = new Link('__root__', $packageName, $constraint, 'requires', $packageVersion); // Add package to the root package and composer.json requirements if (in_array($packageName, self::$config['require-dev'])) { From a6ff63ba10ab576edcf11baafab48176a8d3e721 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Thu, 17 Mar 2016 15:17:59 -0500 Subject: [PATCH 2/2] Added CHANGELOG for #81 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05cee0b..e9334df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,10 @@ All notable changes to this project will be documented in this file, in reverse versions, and updates whoops to allow either 1.1 or 2.0 versions. - [#80](https://github.com/zendframework/zend-expressive-skeleton/pull/80) updates the default ProxyManager constraints to also allow v2 versions. +- [#81](https://github.com/zendframework/zend-expressive-skeleton/pull/81) + fixes an issue in the installer whereby specified constraints were not being + passed to Composer prior to dependency resolution/installation, resulting in + stale dependencies. ## 1.0.0 - 2016-01-28