From e6f71501967d549536ac80a65067d085e1560d92 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 4 Jul 2012 14:22:09 +0200 Subject: [PATCH] Change default minimum-stability to "stable", fixes #744 --- src/Composer/DependencyResolver/Pool.php | 3 +-- src/Composer/Package/Locker.php | 3 +-- src/Composer/Package/MemoryPackage.php | 3 +-- tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php | 2 +- .../Test/Fixtures/installer/aliased-priority-conflicting.test | 3 ++- tests/Composer/Test/Fixtures/installer/aliased-priority.test | 3 ++- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Composer/DependencyResolver/Pool.php b/src/Composer/DependencyResolver/Pool.php index 7c7c1fca4..f208568ee 100644 --- a/src/Composer/DependencyResolver/Pool.php +++ b/src/Composer/DependencyResolver/Pool.php @@ -33,8 +33,7 @@ class Pool protected $acceptableStabilities; protected $stabilityFlags; - // TODO BC change to stable end of june? - public function __construct($minimumStability = 'dev', array $stabilityFlags = array()) + public function __construct($minimumStability = 'stable', array $stabilityFlags = array()) { $stabilities = BasePackage::$stabilities; $this->acceptableStabilities = array(); diff --git a/src/Composer/Package/Locker.php b/src/Composer/Package/Locker.php index 8b37e6c0d..ee4558e23 100644 --- a/src/Composer/Package/Locker.php +++ b/src/Composer/Package/Locker.php @@ -132,8 +132,7 @@ class Locker { $lockData = $this->getLockData(); - // TODO BC change dev to stable end of june? - return isset($lockData['minimum-stability']) ? $lockData['minimum-stability'] : 'dev'; + return isset($lockData['minimum-stability']) ? $lockData['minimum-stability'] : 'stable'; } public function getStabilityFlags() diff --git a/src/Composer/Package/MemoryPackage.php b/src/Composer/Package/MemoryPackage.php index d0e4cd053..b4bd664c3 100644 --- a/src/Composer/Package/MemoryPackage.php +++ b/src/Composer/Package/MemoryPackage.php @@ -48,8 +48,7 @@ class MemoryPackage extends BasePackage protected $prettyAlias; protected $dev; - // TODO BC change dev to stable end of june? - protected $minimumStability = 'dev'; + protected $minimumStability = 'stable'; protected $stabilityFlags = array(); protected $references = array(); diff --git a/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php b/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php index 81530fe06..7a1a6be58 100644 --- a/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php +++ b/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php @@ -31,7 +31,7 @@ class DefaultPolicyTest extends TestCase public function setUp() { - $this->pool = new Pool; + $this->pool = new Pool('dev'); $this->repo = new ArrayRepository; $this->repoInstalled = new ArrayRepository; diff --git a/tests/Composer/Test/Fixtures/installer/aliased-priority-conflicting.test b/tests/Composer/Test/Fixtures/installer/aliased-priority-conflicting.test index 481604cc3..cda5d31d3 100644 --- a/tests/Composer/Test/Fixtures/installer/aliased-priority-conflicting.test +++ b/tests/Composer/Test/Fixtures/installer/aliased-priority-conflicting.test @@ -40,7 +40,8 @@ Aliases take precedence over default package even if default is selected "a/a": "dev-master", "a/b": "dev-master", "a/req": "dev-feature-foo as dev-master" - } + }, + "minimum-stability": "dev" } --RUN-- install diff --git a/tests/Composer/Test/Fixtures/installer/aliased-priority.test b/tests/Composer/Test/Fixtures/installer/aliased-priority.test index 0cde23361..97ffe5521 100644 --- a/tests/Composer/Test/Fixtures/installer/aliased-priority.test +++ b/tests/Composer/Test/Fixtures/installer/aliased-priority.test @@ -42,7 +42,8 @@ Aliases take precedence over default package "a/a": "1.*", "a/b": "1.*", "a/c": "dev-feature-foo as dev-master" - } + }, + "minimum-stability": "dev" } --RUN-- install