1
0
Fork 0

Fix error output to be clearer when running composer.phar without phar extension, fixes #10097

pull/10115/head
Jordi Boggiano 2021-09-13 21:46:28 +02:00
parent 6179f33c74
commit 8657f80ddd
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 5 additions and 0 deletions

View File

@ -302,6 +302,11 @@ if (extension_loaded('apc') && filter_var(ini_get('apc.enable_cli'), FILTER_VALI
}
}
if (!class_exists('Phar')) {
echo 'PHP\'s phar extension is missing. Composer requires it to run. Enable the extension or recompile php without --disable-phar then try again.' . PHP_EOL;
exit(1);
}
Phar::mapPhar('composer.phar');
EOF;