1
0
Fork 0

Add warning for extra awareness about dangers of requiring anything, fixes #12312 (#12319)

main
Jordi Boggiano 2025-02-19 14:50:19 +01:00 committed by GitHub
parent da63c30330
commit bc4bc7340f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -280,7 +280,8 @@ class Problem
if (null === $version) {
$providersStr = self::getProvidersList($repositorySet, $packageName, 5);
if ($providersStr !== null) {
$providersStr = "\n\n Alternatively you can require one of these packages that provide the extension (or parts of it):\n$providersStr";
$providersStr = "\n\n Alternatively you can require one of these packages that provide the extension (or parts of it):\n".
" <warning>Keep in mind that the suggestions are automated and may not be valid or safe to use</warning>\n$providersStr";
}
if (extension_loaded($ext)) {
@ -306,7 +307,8 @@ class Problem
$providersStr = self::getProvidersList($repositorySet, $packageName, 5);
if ($providersStr !== null) {
$providersStr = "\n\n Alternatively you can require one of these packages that provide the library (or parts of it):\n$providersStr";
$providersStr = "\n\n Alternatively you can require one of these packages that provide the library (or parts of it):\n".
" <warning>Keep in mind that the suggestions are automated and may not be valid or safe to use</warning>\n$providersStr";
}
return ["- Root composer.json requires linked library ".$packageName.self::constraintToText($constraint).' but ', 'it has the wrong version installed or is missing from your system, make sure to load the extension providing it.'.$providersStr];