From f40f95b269386b20066b5bee3ea382b3439c23ab Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Thu, 16 Nov 2017 10:15:37 +0100 Subject: [PATCH 1/2] Add a note that a user could have forgotten to add a custom repo if package not found --- src/Composer/DependencyResolver/SolverProblemsException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/DependencyResolver/SolverProblemsException.php b/src/Composer/DependencyResolver/SolverProblemsException.php index 6014012a4..142895697 100644 --- a/src/Composer/DependencyResolver/SolverProblemsException.php +++ b/src/Composer/DependencyResolver/SolverProblemsException.php @@ -43,7 +43,7 @@ class SolverProblemsException extends \RuntimeException } if (strpos($text, 'could not be found') || strpos($text, 'no matching package found')) { - $text .= "\nPotential causes:\n - A typo in the package name\n - The package is not available in a stable-enough version according to your minimum-stability setting\n see for more details.\n\nRead for further common problems."; + $text .= "\nPotential causes:\n - A typo in the package name\n - The package is not available in a stable-enough version according to your minimum-stability setting\n see for more details.\n - It's a private package and you forgot to add a custom repository to find it\n\nRead for further common problems."; } if ($hasExtensionProblems) { From 7dffe79a0fc63437ee501d4ab02b607711efff96 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Thu, 16 Nov 2017 12:41:41 +0100 Subject: [PATCH 2/2] Update tests of solver problem message to match new message --- tests/Composer/Test/DependencyResolver/SolverTest.php | 3 ++- .../Test/Fixtures/installer/broken-deps-do-not-replace.test | 1 + tests/Composer/Test/Fixtures/installer/solver-problems.test | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Composer/Test/DependencyResolver/SolverTest.php b/tests/Composer/Test/DependencyResolver/SolverTest.php index 9067c4abd..989c992f0 100644 --- a/tests/Composer/Test/DependencyResolver/SolverTest.php +++ b/tests/Composer/Test/DependencyResolver/SolverTest.php @@ -710,7 +710,8 @@ class SolverTest extends TestCase $msg .= "Potential causes:\n"; $msg .= " - A typo in the package name\n"; $msg .= " - The package is not available in a stable-enough version according to your minimum-stability setting\n"; - $msg .= " see for more details.\n\n"; + $msg .= " see for more details.\n"; + $msg .= " - It's a private package and you forgot to add a custom repository to find it\n\n"; $msg .= "Read for further common problems."; $this->assertEquals($msg, $e->getMessage()); } diff --git a/tests/Composer/Test/Fixtures/installer/broken-deps-do-not-replace.test b/tests/Composer/Test/Fixtures/installer/broken-deps-do-not-replace.test index fe6b00fff..db4ef23c0 100644 --- a/tests/Composer/Test/Fixtures/installer/broken-deps-do-not-replace.test +++ b/tests/Composer/Test/Fixtures/installer/broken-deps-do-not-replace.test @@ -34,6 +34,7 @@ Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see for more details. + - It's a private package and you forgot to add a custom repository to find it Read for further common problems. diff --git a/tests/Composer/Test/Fixtures/installer/solver-problems.test b/tests/Composer/Test/Fixtures/installer/solver-problems.test index 605bd3cae..e0359a151 100644 --- a/tests/Composer/Test/Fixtures/installer/solver-problems.test +++ b/tests/Composer/Test/Fixtures/installer/solver-problems.test @@ -55,6 +55,7 @@ Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see for more details. + - It's a private package and you forgot to add a custom repository to find it Read for further common problems.