How to update the PHP version in Laravel?

Asked

Viewed 1,798 times

2

I tried to install a dependency and he asked for a larger version of PHP.

Problem 1
  • Illuminate/support v5.3.4 requires php >=5.6.4 -> your PHP version (5.5.9) does not satisfy that requirement.
  • Illuminate/support v5.3.16 requires php >=5.6.4 -> your PHP version (5.5.9) does not satisfy that requirement.
  • Illuminate/support v5.3.0 requires php >=5.6.4 -> your PHP version (5.5.9) does not satisfy that requirement.
  • elibyy/tcpdf-Laravel 5.3.0 requires Illuminate/support 5.3.x -> satisfiable by Illuminate/support[v5.3.0, v5.3.16, v5.3.4].
  • Installation request for elibyy/tcpdf-Laravel 5.3. * -> satisfiable by elibyy/tcpdf-Laravel[5.3.0].

There is a way to update the php version on composer.json?

  • 1

    You have to install the PHP version on your Computer Operating System, via composer.json does not give, it is for the package manager. What is the operating system?

  • No use changing the requested version of php in the Composer pq so it will not work the Standard, you have to update the same PHP.

  • @Virgilionovic Usage Windows 7

  • @Denali has to install php greater or equal to 5.6.4 on the server you are using. Have I forgotten which server you are using? Apache or IIS ?

  • You use Wamp, Xampp or some other local server?

2 answers

1

There is a way to update the php version on composer.json?

There is no way to "update PHP" through Composer. What can be done is to change the version required for the operation of the application.

However, in your case, you really need to update PHP on your operating system, since the standard Laravel 5.3 requires the PHP 5.6.4 >=, and you’re using the version 5.5.9.

So install the PHP version requirida, that the problem will be solved.

Maybe this question will help:

How to install php-5 in Ubuntu?

0

For those who need to upgrade to php 7.4 (last currently) with Ubuntu 18.04 and Laravel:

sudo apt update
sudo apt upgrade
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.4-fpm
sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y

Once you’ve upgraded PHP go to the file package.json which is at the root of the application and changes the php version:

...
"platform": {
    "php": "7.4"
}
...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.