是否可以将 Laravel 5.4 降级到 5.2

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/42674706/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 15:30:36  来源:igfitidea点击:

Is it possible to downgrade Laravel 5.4 to 5.2

phplaravel

提问by CoffeeGuy

Due to technical reasons I just have to downgrade, mainly because I am more used to 5.2 than the newest version.

由于技术原因我只能降级,主要是因为我比最新版本更习惯5.2。

回答by Troyer

To downgrade from 5.4 to 5.2 it will take A LOTof time, is much faster and easier to create a new Laravel project.

从 5.4 降级到 5.2 需要很多时间,创建新的 Laravel 项目会更快更容易。

In case you want to install a specific Laravel version you can create the project with --prefer-dist on console:

如果你想安装特定的 Laravel 版本,你可以在控制台上使用 --prefer-dist 创建项目:

composer create-project --prefer-dist laravel/laravel projectname "5.2.*"

More info on the docs: https://laravel.com/docs/5.2/installation#installing-laravel

有关文档的更多信息:https: //laravel.com/docs/5.2/installation#installing-laravel

回答by Jerry

The best way to do this is by changing the value of the Laravel version inside the composer file to the one one you want. This solved my problem as fast as possible

最好的方法是将 Composer 文件中 Laravel 版本的值更改为您想要的值。这尽快解决了我的问题

回答by hassan

since laravel 5.4.xrequire specific version of php :

由于laravel 5.4.x需要特定版本的 php :

...
"require": {
    "php": ">=5.6.4",
...

and laravel 5.2.xrequire a lower version of php

laravel 5.2.x需要较低版本的php

...
"require": {
    "php": ">=5.5.9",
...

and according to the major changesbetween php 5.5.x and php 5.6.x

并根据php 5.5.x 和 php 5.6.x 之间的主要变化

which may be used in laravel 5.4 , it will be not wise to downgrade .

可能会在laravel 5.4中使用,降级是不明智的。