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

SigalZ's avatar

Composer php version error

I wonder if someone can help me with a composer error.

I run Laravel 9 on Windows 10.

I just installed this package: https://spatie.be/docs/laravel-livewire-wizard/v1/introduction

and now I get this error: Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.13. in C:\wamp64\www\highland9.local\vendor\composer\platform_check.php on line 24

After googling it I check all of these:

php version on Wamp shows 8.1.0

Windows path points to: c:\wamp64\bin\php8.1.0

cmd php -v shows: 8.1.0

In my composer.json file:

it was:

"require": {
        "php": "^8.0.2",

I changed it to:

"php":"^8.1.0"

and ran composer update

I tried removing the package like this:

composer remove vendor/spatie/laravel-livewire-wizard

It said there's nothing to remove.

I renamed the folder to laravel-livewire-wizardDEL

I removed the line:

"spatie/laravel-livewire-wizard": "^1.1",

from composer.json and ran composer update

Nothing helps, still get this error.

Can someone please help?

0 likes
15 replies
Sinnbeck's avatar

Can you show the output of which composer? Are you running these commands in the windows command line or git bash?

SigalZ's avatar

@Sinnbeck which composer is not recognized. I ran it on Visual Code Terminal

I ran which composer on cmd

Sinnbeck's avatar

@SigalZ ok so what exact command are you now running and what exact error?

SigalZ's avatar

@Sinnbeck I'm trying to run my site on firefox.

mysite.local

Worked fine until now.

The exact error I get in the browser:

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.13. in C:\wamp64\www\highland9.local\vendor\composer\platform_check.php on line 24

Sinnbeck's avatar

@SigalZ ah so it's in the browser. You need to set wamp to use 8.1 for the site.

SigalZ's avatar

@Sinnbeck It is using 8.1.0 as I wrote in the original question, unless I am missing something

I just created a new project to test, and this project runs fine so wamp is on 8.1.0

Sinnbeck's avatar

@SigalZ ok then I don't know. Wamp is reporting 8.0 to laravel for some reason

SigalZ's avatar

running phpinfo() also shows 8.1.0

SigalZ's avatar

ok, I found out that the virtual host on wamp for my site is using php 8.0.13.

Not sure how to change this and it worked fine until now.

If I use php artisan serve it works fine, but I don't like using that so I'm trying to figure out how to set the php version on the virtual host.

SigalZ's avatar
SigalZ
OP
Best Answer
Level 5

Ok, fixed it!!!

On Wamp icon - YourVirtualHosts - Virtual Host management. It opens in the browser and gives an option to modify the virtual host form and change the php version it uses.

Geezzzz, almost lost the will to live.

Thank you @sinnbeck

Sinnbeck's avatar

@SigalZ ah so it did indeed give the wrong version :) great that you found out how to change it

Still unsure why phpinfo() in that project showed the wrong version. Must be a bug in wamp

Please or to participate in this conversation.