1
0
Fork 0

Warn 1.x users when a package is not found that it may be due to our deprecation policy

pull/10150/head
Jordi Boggiano 2021-06-08 21:12:49 +02:00
parent cd682f90a6
commit a02802b109
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
4 changed files with 4 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class SolverProblemsException extends \RuntimeException
} }
if (strpos($text, 'could not be found') || strpos($text, 'no matching package found')) { 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 <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."; $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.";
} }
if ($hasExtensionProblems) { if ($hasExtensionProblems) {

View File

@ -709,6 +709,7 @@ class SolverTest extends TestCase
$msg .= " - Installation request for a -> satisfiable by A[1.0].\n"; $msg .= " - Installation request for a -> satisfiable by A[1.0].\n";
$msg .= " - A 1.0 requires b >= 2.0 -> no matching package found.\n\n"; $msg .= " - A 1.0 requires b >= 2.0 -> no matching package found.\n\n";
$msg .= "Potential causes:\n"; $msg .= "Potential causes:\n";
$msg .= " - This package is not installable via Composer 1.x, see <https://blog.packagist.com/deprecating-composer-1-support/>\n";
$msg .= " - A typo in the package name\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 .= " - The package is not available in a stable-enough version according to your minimum-stability setting\n";
$msg .= " see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.\n"; $msg .= " see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.\n";

View File

@ -31,6 +31,7 @@ Your requirements could not be resolved to an installable set of packages.
- Installation request for b/b 1.* -> satisfiable by b/b[1.0.0]. - Installation request for b/b 1.* -> satisfiable by b/b[1.0.0].
Potential causes: Potential causes:
- This package is not installable via Composer 1.x, see <https://blog.packagist.com/deprecating-composer-1-support/>
- A typo in the package name - A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting - The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

View File

@ -52,6 +52,7 @@ Your requirements could not be resolved to an installable set of packages.
- 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. - 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.
Potential causes: Potential causes:
- This package is not installable via Composer 1.x, see <https://blog.packagist.com/deprecating-composer-1-support/>
- A typo in the package name - A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting - The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.