简体   繁体   English

Laravel 5.5。 和 PHP 7

[英]Laravel 5.5. and PHP 7

I am updating to Laravel 5.5.我正在更新到 Laravel 5.5。 which uses PHP 7.0 version.它使用 PHP 7.0 版本。 I need to do setup on my local machine and on AWS as well.我需要在我的本地机器和 AWS 上进行设置。 First, locally WAMP server is installed which comes with PHP 7.0 ... I've selected it and when localhost is opened I get the message that the PHP version is 7.0.10 ... After changing version numbers for Laravel and PHP in composer.json, I did update and got this message:首先,安装了 PHP 7.0 附带的本地 WAMP 服务器......我选择了它,当打开 localhost 时,我收到 PHP 版本为 7.0.10 的消息......在 Composer 中更改 Laravel 和 PHP 的版本号后.json,我确实更新并收到了这条消息:

  • Problem 1问题一
    • This package requires php >=7.0 but your PHP version (5.6.25) does not satisfy that requirement.此软件包需要 php >=7.0,但您的 PHP 版本 (5.6.25) 不满足该要求。 Problem 2问题二
    • laravel/framework v5.5.2 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement. laravel/framework v5.5.2 需要 php >=7.0 -> 您的 PHP 版本 (5.6.25) 不满足该要求。
    • laravel/framework v5.5.1 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement. laravel/framework v5.5.1 需要 php >=7.0 -> 您的 PHP 版本 (5.6.25) 不满足该要求。
    • laravel/framework v5.5.0 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement. laravel/framework v5.5.0 需要 php >=7.0 -> 您的 PHP 版本 (5.6.25) 不满足该要求。
    • Installation request for laravel/framework 5.5.* -> satisfiable by laravel/framework[v5.5.0, v5.5.1, v5.5.2]. laravel/framework 5.5.* 的安装请求 -> laravel/framework[v5.5.0, v5.5.1, v5.5.2] 可满足。

It is written that I still use 5.6.写到我还在用5.6。 How can I change this?我怎样才能改变这个?

According to @iainn Apache is using PHP 7, but the CLI (which Composer uses) is still using 5.6 hence, trying to uninstall and install composer again and select the correct php version (7.0) while setup.根据@iainn Apache 使用的是 PHP 7, but the CLI (which Composer uses) is still using 5.6因此,尝试卸载并再次安装 composer 并在安装时选择正确的 php 版本 (7.0)。 Check below screenshot检查下面的屏幕截图

在此处输入图片说明

You're getting an error from composer.你从作曲家那里得到一个错误。 Try using 'composer install --ignore-platform-reqs' to setup your project folder.尝试使用“composer install --ignore-platform-reqs”来设置您的项目文件夹。

Just change varible enviroment on your computer add path php you would you like to use只需更改计算机上的变量环境,添加您要使用的路径 php

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Laravel 5.5。 队列推送 - Laravel 5.5. queue push Laravel 5.5。 使用身份验证和Ardent - Laravel 5.5. using authentication and Ardent Laravel 5.5。 在json中包含关系表 - Laravel 5.5. Include relation table in json Laravel 5.5。*目录结构不同 - Laravel 5.5.* directory structure different Laravel 5.5。 应用程序外观在异常处理程序中不起作用 - Laravel 5.5. App facade is not working in the Exception handler "<i>php artisan serve get cached or does not react while updating code in Laravel 5.5.<\/i> php artisan serve 在 Laravel 5.5 中更新代码时被缓存或不响应。<\/b> <i>After a restart, it works again each time<\/i>重新启动后,它每次都会再次工作<\/b>" - php artisan serve get cached or does not react while updating code in Laravel 5.5. After a restart, it works again each time Lumen:在 routes.php 第 17 行:升级到 5.5 后调用未定义的方法 Laravel\Lumen\Application::post()。* - Lumen: In routes.php line 17: Call to undefined method Laravel\Lumen\Application::post(), after upgrade to 5.5.* Laravel 5.5。 无法使用特定名称实例化课程 - Laravel 5.5. Can't instantiate class with a specific name 在laravel 5.5中提交表单时302状态正在获取。 提交表单页面后重定向 - 302 status is getting when submit form in laravel 5.5. After submit the form page is redirecting back 使用apt-get将php 5.5。*升级到php 5.6。* - Upgrade php 5.5.* to php 5.6.* using apt-get
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM