安装指定版本的 Lumen 框架
目前只有通过 composer create-project 方式, lumen new 方式不支持。
安装过程如下:
一,使用以下命令:
# composer create-project laravel/lumen api.lumen-5.4 --prefer-dist "5.4.*" 项目名称 指定的框架版本
安装相关 package 的过程: Installing laravel/lumen (v5.4.0) - Installing laravel/lumen (v5.4.0): Downloading (100%) Created project in api.lumen-5.4 > php -r "copy('.env.example', '.env');" Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 68 installs, 0 updates, 0 removals .......... Writing lock file Generating autoload files
二,查看版本
# cd api.lumen-5.4/ # php artisan
版显示如下:
Laravel Framework Lumen (5.4.7) (Laravel Components 5.4.*) Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --env[=ENV] The environment the command should run under -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug