Laravel 安装程序不断安装 5.5 而不是 5.6 [英] Laravel installer keeps installing 5.5 instead of 5.6
问题描述
我在 Windows 10 上安装了 php 7.2.2/apache 2.4 和 mysql-5.7.
I installed php 7.2.2 / apache 2.4 and mysql-5.7 on windows 10.
我要安装laravel 5.6
I want to install laravel 5.6
第一:
1. composer clear-cache
2. composer update
3. composer global require "laravel/installer"
php -v:
PHP 7.2.2 (cli) (built: Jan 31 2018 19:31:17) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
和Laravel Installer 2.0.1
我试试这个(根据laravel doc 5.6):
I try this (according to the laravel doc 5.6):
composer create-project --prefer-dist laravel/laravel blog
但是它安装了laravel 5.5.28
But it install laravel 5.5.28
为什么 composer 一直安装 Laravel 5.5?
Why does composer keep installing laravel 5.5?
推荐答案
Laravel 5.6 直到今天(2018-02-07)才正式发布.
Laravel 5.6 was not officially released until today (2018-02-07).
既然已经正式发布,Laravel 安装程序和 composer create-project 将使用 5.6,而不是 5.5.
Now that it has been officially released, the Laravel installer and the composer create-project will use 5.6, instead of 5.5.
如果您想安装不是当前版本的版本,您需要指定要安装的版本作为 composer create-project
的最后一个参数.
If you'd like to install a version that is not the current version, you need to specify the version to install as the last parameter to composer create-project
.
例如,现在 5.6 已经发布并且是当前版本,如果您想创建一个 5.5 项目,您需要在 composer 语句中添加5.5":
For example, now that 5.6 has been released and is the current version, if you wanted to create a 5.5 project, you would add "5.5" to the composer statement:
composer create-project --prefer-dist laravel/laravel 博客5.5.*"
这篇关于Laravel 安装程序不断安装 5.5 而不是 5.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!