1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 00:40:06 +01:00
Files
laravel-valet/cli/includes/compatibility.php
Taylor Otwell 97f7ae2342 organize better
2016-05-10 08:29:24 -05:00

25 lines
547 B
PHP

<?php
/**
* Check the system's compatibility with Valet.
*/
$inTestingEnvironment = strpos($_SERVER['SCRIPT_NAME'], 'phpunit') !== false;
if (PHP_OS != 'Darwin' && ! $inTestingEnvironment) {
echo 'Valet only supports the Mac operating system.'.PHP_EOL;
exit(1);
}
if (version_compare(PHP_VERSION, '5.5.9', '<')) {
echo "Valet requires PHP 5.5.9 or later.";
exit(1);
}
if (exec('which brew') != '/usr/local/bin/brew' && ! $inTestingEnvironment) {
echo 'Valet requires Brew to be installed on your Mac.';
exit(1);
}