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

GodziLaravel's avatar

Problem of php version when I try to install barryvdh/laravel-ide-helper

Hello, This mmrning I faced this problem on my local machine :

Class "Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider" not found

I really dont understand why ?

When I try to install Barryvdh

 composer require --dev barryvdh/laravel-ide-helper

Using version ^2.12 for barryvdh/laravel-ide-helper
./composer.json has been updated
Running composer update barryvdh/laravel-ide-helper
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires php ^7.3 but your php version (8.1.0) does not satisfy that requirement.
  Problem 2
    - pusher/pusher-php-server is locked to version v3.3.1 and an update of this package was not requested.
    - pusher/pusher-php-server v3.3.1 requires php ^5.4 || ^7.0 -> your php version (8.1.0) does not satisfy that requirement.
  Problem 3
    - renatomarinho/laravel-page-speed is locked to version 1.9.0 and an update of this package was not requested.
    - renatomarinho/laravel-page-speed 1.9.0 requires php ^5.6 || ^7.0 -> your php version (8.1.0) does not satisfy that requirement.
  Problem 4
    - fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested.
    - fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.1.0) does not satisfy that requirement.
  Problem 5
    - pusher/pusher-php-server v3.3.1 requires php ^5.4 || ^7.0 -> your php version (8.1.0) does not satisfy that requirement.
    - beyondcode/laravel-websockets 1.12.0 requires pusher/pusher-php-server ^3.0|^4.0|^5.0 -> satisfiable by pusher/pusher-php-server[v3.3.1].
    - beyondcode/laravel-websockets is locked to version 1.12.0 and an update of this package was not requested.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require barryvdh/laravel-ide-helper:*" to figure out if any version is installable, or "composer require barryvdh/laravel-ide-helper:^2.1" if you know which you need.

My composer.json :

    "require": {
        "php": "^7.3",

Any idea?

0 likes
4 replies
Nakov's avatar

on your machine you don't have PHP 7.3 installed, so change this:

 "require": {
        "php": "^7.3",

to

 "require": {
        "php": "^8.1",
GodziLaravel's avatar

@nakov , Thanks

Indeed on my local machine I have php8.1

but on my production server it's php7.4

If I change to "php": "^8.1", it will not make a problem on production server ?

GodziLaravel's avatar

@Nakov Thanks , I downgraded my php version to 7.4 and everything works like a charm.

Thanks again

Please or to participate in this conversation.