使用composer create-project安装特定的laravel版本 [英] Installing specific laravel version with composer create-project
问题描述
安装Laravel的最快,最简单的方法是通过composer命令。从laravel文档( http://laravel.com/docs/quick ),它显示我们可以安装它:
composer create-project laravel / laravel your-project-name --prefer-dist
但是,当你运行上面的命令,它会抓住最新版本的Laravel。如果我想安装最新版本的4.0.x如何控制它?
composer help create-project code>命令
create-project命令从给定的
包中创建一个新项目新目录。如果在没有params的情况下执行,并且在
目录中有一个composer.json文件,它将为当前项目安装
软件包。
您可以使用此命令引导新项目或设置干净
为您项目的开发人员提供版本控制的安装。
[version]
您也可以使用=或:as
指定包名称的版本。 / strong>
要安装不稳定的软件包,请指定所需的版本,或者
使用--stability = dev(其中dev可以是RC,
beta,alpha或dev)。
此命令有效:
composer create-project laravel / laravel = 4.1.27 your-project-name --prefer-dist
这使用*符号。
The fastest and simplest way of installing Laravel is via composer command. From the laravel docs (http://laravel.com/docs/quick), it shows that we can install it with this:
composer create-project laravel/laravel your-project-name --prefer-dist
But, when you run the above command, it will grab the latest version of Laravel. How can I control it if I want to install latest version of 4.0.x? Or, 4.1.x when 4.2 is out?
From the composer help create-project
command
The create-project command creates a new project from a given
package into a new directory. If executed without params and in a directory with a composer.json file it installs the packages for the current project.
You can use this command to bootstrap new projects or setup a clean
version-controlled installation for developers of your project.[version]
You can also specify the version with the package name using = or : as separator.
To install unstable packages, either specify the version you want, or use the --stability=dev (where dev can be one of RC, beta, alpha or dev).
This command works:
composer create-project laravel/laravel=4.1.27 your-project-name --prefer-dist
This works with the * notation.
这篇关于使用composer create-project安装特定的laravel版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!