1
0
Fork 0

Merge pull request #8490 from johnstevenson/onedrive

Add Windows OneDrive to platform warnings
pull/8494/head
Jordi Boggiano 2019-12-22 12:07:12 +01:00 committed by GitHub
commit bfdb028e50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -576,6 +576,13 @@ EOT
$warnings['xdebug_loaded'] = true;
}
if (defined('PHP_WINDOWS_VERSION_BUILD')
&& (version_compare(PHP_VERSION, '7.2.23', '<')
|| (version_compare(PHP_VERSION, '7.3.0', '>=')
&& version_compare(PHP_VERSION, '7.3.10', '<')))) {
$warnings['onedrive'] = PHP_VERSION;
}
if (!empty($errors)) {
foreach ($errors as $error => $current) {
switch ($error) {
@ -699,6 +706,11 @@ EOT
$text .= " xdebug.profiler_enabled = 0";
$displayIniMessage = true;
break;
case 'onedrive':
$text = "The Windows OneDrive folder is not supported on PHP versions below 7.2.23 and 7.3.10.".PHP_EOL;
$text .= "Upgrade your PHP ({$current}) to use this location with Composer.".PHP_EOL;
break;
}
$out($text, 'comment');
}