Laravel 5.4 PHP 要求(5.6.30 与 5.6.40)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/43924779/
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:57:13  来源:igfitidea点击:

Laravel 5.4 PHP requirements (5.6.30 vs 5.6.40)

phplaravellaravel-5versionlaravel-5.4

提问by Alain D'Ettorre

I'd like to use Laravel 5.4 on my production server but the latest PHP 5.6 version available is 5.6.30 (as my local XAMPP installation as well), while the requirements for Laravel 5.4 are php >= 5.6.40 as for https://packagist.org/packages/laravel/laravel

我想在我的生产服务器上使用 Laravel 5.4,但可用的最新 PHP 5.6 版本是 5.6.30(我的本地 XAMPP 安装也是如此),而 Laravel 5.4 的要求是 php >= 5.6.40,对于https: //packagist.org/packages/laravel/laravel

Now, I've successfully installed Laravel 5.4 on the server in a subdirectory via SSH and the home page is showing the Laravel logo. Is there some problems I could encounter using this version of PHP down the road? If so, is there any polyfill or adjustment to be made in order to use Laravel 5.4 on PHP 5.6.30 instead of PHP 5.6.40? Thanks

现在,我已经通过 SSH 在服务器上的子目录中成功安装了 Laravel 5.4,并且主页显示了 Laravel 徽标。我在使用这个版本的 PHP 时会遇到一些问题吗?如果是这样,为了在 PHP 5.6.30 上使用 Laravel 5.4 而不是 PHP 5.6.40,是否需要进行任何 polyfill 或调整?谢谢

回答by user1598814

Laravel require php 5.6.4 as you can see hereand XAMPP is 5.6.30 - This version is NEWER than 5.6.4 ( see all php versions here) So no problems are expected becase you are using newer version than required by Laravel.

Laravel 需要 php 5.6.4,正如您在此处看到的 ,XAMPP 是 5.6.30 - 此版本比 5.6.4 新(请在此处查看所有 php 版本)因此预计不会出现问题,因为您使用的版本比 Laravel 要求的版本新。

回答by k_a_ r_i_s-

composer create-project --prefer-dist laravel/laravel (project name) 5.4.*

composer create-project --prefer-dist laravel/laravel(项目名称)5.4.*

that will install the latest version of laravel supported by php 5.6 see in the attachment above

这将安装 php 5.6 支持的最新版本的 laravel,请参见上面的附件

  composer create-project --prefer-dist laravel/laravel (project name) 5.4.*

回答by Anthony

Laravel 5.4 is compatible with PHP 7.x. Please check the following article. https://murze.be/2016/01/why-we-are-requiring-php-7-for-our-new-packages/

Laravel 5.4 与 PHP 7.x 兼容。请检查以下文章。 https://murze.be/2016/01/why-we-are-requiring-php-7-for-our-new-packages/