diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5f61075b..edef6c5a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: true matrix: - php: [7.2, 7.3, 7.4] + php: [7.3, 7.4] name: PHP ${{ matrix.php }} diff --git a/src/NewCommand.php b/src/NewCommand.php index ed3e8af2..cf7f54b0 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -41,6 +41,10 @@ protected function configure() */ protected function execute(InputInterface $input, OutputInterface $output) { + if (version_compare(PHP_VERSION, '7.3.0', '<')) { + throw new RuntimeException('The Laravel installer requires PHP 7.3.0 or greater. Please use "composer create-project laravel/laravel" instead.'); + } + if (! extension_loaded('zip')) { throw new RuntimeException('The Zip PHP extension is not installed. Please install it and try again.'); }