1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-07 09:10:03 +01:00
Files
laravel-valet/cli/includes/compatibility.php
2016-05-27 10:36:50 -05:00

25 lines
549 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);
}