Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tarik's avatar
Level 11

Upgrading Laravel - Php version

Hello, Anyone had a same/similar problem? How to fix this? Where to find config.platform.php?

C:\Users\Tarik
λ cd /d e:lager

E:\lager
λ php artisan --version
Laravel Framework 5.4.34

E:\lager
λ php -v
PHP 7.0.0 (cli) (built: Dec  3 2015 09:31:42) ( ZTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies

E:\lager
λ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework v5.5.3 requires php >=7.0 -> your PHP version (7.0.0) overridden by "config.platform.php" version (5.6.4) does not satisfy that requirement.
    - laravel/framework v5.5.2 requires php >=7.0 -> your PHP version (7.0.0) overridden by "config.platform.php" version (5.6.4) does not satisfy that requirement.
    - laravel/framework v5.5.1 requires php >=7.0 -> your PHP version (7.0.0) overridden by "config.platform.php" version (5.6.4) does not satisfy that requirement.
    - laravel/framework v5.5.0 requires php >=7.0 -> your PHP version (7.0.0) overridden by "config.platform.php" version (5.6.4) does not satisfy that requirement.
    - Installation request for laravel/framework 5.5.* -> satisfiable by laravel/framework[v5.5.0, v5.5.1, v5.5.2, v5.5.3].


E:\lager
λ

Thank you

0 likes
6 replies
andreasbakir's avatar

you have another php installation you have to set the default to php 7, as it says in config.platform.php the version gets overriden so i would check that file

andreasbakir's avatar

type in your terminal

which php

it should give you the path of your default php installation which is propably php 5.x go to that folder and search for that config.platform.php (I am not sure if it is over there) or even beter uninstall that version of php

tarik's avatar
Level 11
E:\lager
λ which php
/e/wamp64/bin/php/php7.0.0/php

privyreza's avatar
Level 1

If your php version is >= 7.0 then the config.platform.php is getting a locked php version from composer.json

To fix problem open composer.json and configure platform as below:

"platform": { "php": "7.0" }

Then do a composer update

tarik's avatar
Level 11

It started to update, Thank you

E:\lager
λ php artisan --version
Laravel Framework 5.5.3

Please or to participate in this conversation.