8000 Warn 1.x users when a package is not found that it may be due to our … · composer/composer@a02802b · GitHub
[go: up one dir, main page]

Skip to content

Commit a02802b

Browse files
committed
Warn 1.x users when a package is not found that it may be due to our deprecation policy
1 parent cd682f9 commit a02802b

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

src/Composer/DependencyResolver/SolverProblemsException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function createMessage()
4343
}
4444

4545
if (strpos($text, 'could not be found') || strpos($text, 'no matching package found')) {
46-
$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 <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.\n - It's a private package and you forgot to add a custom repository to find it\n\nRead <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.";
46+
$text .= "\nPotential causes:\n - This package is not installable via Composer 1.x, see <https://blog.packagist.com/deprecating-composer-1-support/>\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 <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.\n - It's a private package and you forgot to add a custom repository to find it\n\nRead <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.";
4747
}
4848

4949
if ($hasExtensionProblems) {

tests/Composer/Test/DependencyResolver/SolverTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ public function testUnsatisfiableRequires()
709709
$msg .= " - Installation request for a -> satisfiable by A[1.0].\n";
710710
$msg .= " - A 1.0 requires b >= 2.0 -> no matching package found.\n\n";
711711
$msg .= "Potential causes:\n";
712+
$msg .= " - This package is not installable via Composer 1.x, see <https://blog.packagist.com/deprecating-composer-1-support/>\n";
712713
$msg .= " - A typo in the package name\n";
713714
$msg .= " - The package is not available in a stable-enough version according to your minimum-stability setting\n";
714715
$msg .= " see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.\n";

tests/Composer/Test/Fixtures/installer/broken-deps-do-not-replace.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Your requirements could not be resolved to an installable set of packages.
3131
- Installation request for b/b 1.* -> satisfiable by b/b[1.0.0].
3232

3333
Potential causes:
34+
- This package is not installable via Composer 1.x, see <https://blog.packagist.com/deprecating-composer-1-support/>
3435
- A typo in the package name
3536
- The package is not available in a stable-enough version according to your minimum-stability setting
3637
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

tests/Composer/Test/Fixtures/installer/solver-problems.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Your requirements could not be resolved to an installable set of packages.
5252
- requirer/pkg 1.0.0 requires dependency/pkg 1.0.0 -> satisfiable by dependency/pkg[1.0.0] but these conflict with your requirements or minimum-stability.
5353

5454
Potential causes:
55+
- This package is not installable via Composer 1.x, see <https://blog.packagist.com/deprecating-composer-1-support/>
5556
- A typo in the package name
5657
- The package is not available in a stable-enough version according to your minimum-stability setting
5758
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

0 commit comments

Comments
 (0)
0