Skip to content

Instantly share code, notes, and snippets.

@egorsmkv
Created May 9, 2019 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egorsmkv/14105d5071fa3f976bedb1f724fcee7e to your computer and use it in GitHub Desktop.
Save egorsmkv/14105d5071fa3f976bedb1f724fcee7e to your computer and use it in GitHub Desktop.
A script for checking Laravel requirements
<?php
// This script checks all requirements which a server
// must have for correct work of Laravel 5.8
//
// Author: Yehor Smoliakov
$phpVersion = '7.1.3';
$exts = ['openssl', 'pdo', 'mbstring', 'tokenizer', 'xml', 'ctype', 'json', 'bcmath'];
if (version_compare(PHP_VERSION, $phpVersion) <= 0) {
echo sprintf("Your current PHP version - %s - is not compatible with Laravel\n", PHP_VERSION);
exit;
}
foreach ($exts as $ext) {
if (!extension_loaded($ext)) {
echo sprintf("Extension - %s - is not loaded, you must install it\n", $ext);
}
}
echo "Analyzing is done.\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment