Merge branch '2.3'
commit
3595666e6e
|
@ -97,6 +97,10 @@ trait PackageDiscoveryTrait
|
||||||
$io = $this->getIO();
|
$io = $this->getIO();
|
||||||
|
|
||||||
foreach ($requires as $requirement) {
|
foreach ($requires as $requirement) {
|
||||||
|
if (isset($requirement['version']) && Preg::isMatch('{^\d+(\.\d+)?$}', $requirement['version'])) {
|
||||||
|
$io->writeError('<warning>The "'.$requirement['version'].'" constraint for "'.$requirement['name'].'" appears too strict and will likely not match what you want. See https://getcomposer.org/constraints');
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($requirement['version'])) {
|
if (!isset($requirement['version'])) {
|
||||||
// determine the best version automatically
|
// determine the best version automatically
|
||||||
list($name, $version) = $this->findBestVersionAndNameForPackage($input, $requirement['name'], $platformRepo, $preferredStability, $fixed);
|
list($name, $version) = $this->findBestVersionAndNameForPackage($input, $requirement['name'], $platformRepo, $preferredStability, $fixed);
|
||||||
|
|
|
@ -123,7 +123,7 @@ class SolverProblemsException extends \RuntimeException
|
||||||
|
|
||||||
$ignoreExtensionsArguments = implode(" ", array_map(static function ($extension) {
|
$ignoreExtensionsArguments = implode(" ", array_map(static function ($extension) {
|
||||||
return "--ignore-platform-req=$extension";
|
return "--ignore-platform-req=$extension";
|
||||||
}, $missingExtensions));
|
}, array_unique($missingExtensions)));
|
||||||
|
|
||||||
$text = "To enable extensions, verify that they are enabled in your .ini files:\n - ";
|
$text = "To enable extensions, verify that they are enabled in your .ini files:\n - ";
|
||||||
$text .= implode("\n - ", $paths);
|
$text .= implode("\n - ", $paths);
|
||||||
|
|
|
@ -287,6 +287,11 @@ class Factory
|
||||||
*/
|
*/
|
||||||
public function createComposer(IOInterface $io, $localConfig = null, $disablePlugins = false, ?string $cwd = null, bool $fullLoad = true, bool $disableScripts = false)
|
public function createComposer(IOInterface $io, $localConfig = null, $disablePlugins = false, ?string $cwd = null, bool $fullLoad = true, bool $disableScripts = false)
|
||||||
{
|
{
|
||||||
|
// if a custom composer.json path is given, we change the default cwd to be that file's directory
|
||||||
|
if (is_string($localConfig) && is_file($localConfig) && null === $cwd) {
|
||||||
|
$cwd = dirname($localConfig);
|
||||||
|
}
|
||||||
|
|
||||||
$cwd = $cwd ?? Platform::getCwd(true);
|
$cwd = $cwd ?? Platform::getCwd(true);
|
||||||
|
|
||||||
// load Composer configuration
|
// load Composer configuration
|
||||||
|
|
|
@ -81,7 +81,6 @@ Your requirements could not be resolved to an installable set of packages.
|
||||||
To enable extensions, verify that they are enabled in your .ini files:
|
To enable extensions, verify that they are enabled in your .ini files:
|
||||||
__inilist__
|
__inilist__
|
||||||
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
|
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
|
||||||
Alternatively, you can run Composer with `--ignore-platform-req=ext-foobar --ignore-platform-req=ext-pcre --ignore-platform-req=ext-foobar --ignore-platform-req=ext-pcre` to temporarily ignore these required extensions.
|
Alternatively, you can run Composer with `--ignore-platform-req=ext-foobar --ignore-platform-req=ext-pcre` to temporarily ignore these required extensions.
|
||||||
|
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue