Merge branch 'master' of feistymeow.org:feisty_meow
[feisty_meow.git] / production / example_apps / shared_calendar / bin / cake.php
1 #!/usr/bin/php -q
2 <?php
3 /**
4  * Command-line code generation utility to automate programmer chores.
5  *
6  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
7  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
8  *
9  * Licensed under The MIT License
10  * For full copyright and license information, please see the LICENSE.txt
11  * Redistributions of files must retain the above copyright notice.
12  *
13  * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
14  * @link          http://cakephp.org CakePHP(tm) Project
15  * @since         2.0.0
16  * @license       http://www.opensource.org/licenses/mit-license.php MIT License
17  */
18
19 $minVersion = '5.6.0';
20 if (file_exists('composer.json')) {
21     $composer = json_decode(file_get_contents('composer.json'));
22     if (isset($composer->require->php)) {
23         $minVersion = preg_replace('/([^0-9\.])/', '', $composer->require->php);
24     }
25 }
26 if (version_compare(phpversion(), $minVersion, '<')) {
27     fwrite(STDERR, sprintf("Minimum PHP version: %s. You are using: %s.\n", $minVersion, phpversion()));
28     exit(-1);
29 }
30
31 require dirname(__DIR__) . '/vendor/autoload.php';
32 include dirname(__DIR__) . '/config/bootstrap.php';
33
34 exit(Cake\Console\ShellDispatcher::run($argv));