]> Raphaël G. Git Repositories - binary/blob - composer
Import composer
[binary] / composer
1 #!/usr/bin/env php
2 <?php
3 /*
4 * This file is part of Composer.
5 *
6 * (c) Nils Adermann <naderman@naderman.de>
7 * Jordi Boggiano <j.boggiano@seld.be>
8 *
9 * For the full copyright and license information, please view
10 * the license that is located at the bottom of this file.
11 */
12
13 // Avoid APC causing random fatal errors per https://github.com/composer/composer/issues/264
14 if (extension_loaded('apc') && filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN) && filter_var(ini_get('apc.cache_by_default'), FILTER_VALIDATE_BOOLEAN)) {
15 if (version_compare(phpversion('apc'), '3.0.12', '>=')) {
16 ini_set('apc.cache_by_default', 0);
17 } else {
18 fwrite(STDERR, 'Warning: APC <= 3.0.12 may cause fatal errors when running composer commands.'.PHP_EOL);
19 fwrite(STDERR, 'Update APC, or set apc.enable_cli or apc.cache_by_default to 0 in your php.ini.'.PHP_EOL);
20 }
21 }
22
23 if (!class_exists('Phar')) {
24 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;
25 exit(1);
26 }
27
28 Phar::mapPhar('composer.phar');
29 require 'phar://composer.phar/bin/composer';
30
31 __HALT_COMPILER(); ?>
32 \87Á