mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 00:20:08 +01:00
... because it's not actually compatible with 5.5 anymore - Ref: https://github.com/laravel/valet/issues/279
25 lines
531 B
PHP
25 lines
531 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.6.0', '<')) {
|
|
echo "Valet requires PHP 5.6 or later.";
|
|
|
|
exit(1);
|
|
}
|
|
|
|
if (exec('which brew') == '' && ! $inTestingEnvironment) {
|
|
echo 'Valet requires Homebrew to be installed on your Mac.';
|
|
|
|
exit(1);
|
|
}
|