0

I'm facing a composer error while installing a websocket in my laravel project. My intention is to install this websocket and use it for real-time notifications, but I'm facing an error after issuing an installation command. Below here is what I'm facing:

  Problem 1
- Conclusion: don't install beyondcode/laravel-websockets 1.12.0
- Conclusion: remove guzzlehttp/psr7 2.1.0
- Installation request for beyondcode/laravel-websockets ^1.12 -> satisfiable by beyondcode/laravel-websockets[1.12.0, 1.x-dev].
- Conclusion: don't install guzzlehttp/psr7 2.1.0
- beyondcode/laravel-websockets 1.x-dev requires guzzlehttp/psr7 ^1.5 -> satisfiable by guzzlehttp/psr7[1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.x-dev].
- Can only install one of: guzzlehttp/psr7[1.7.0, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.8.0, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.8.1, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.8.2, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.8.3, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.x-dev, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.5.0, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.5.1, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.5.2, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.6.0, 2.1.0].
- Can only install one of: guzzlehttp/psr7[1.6.1, 2.1.0].
- Installation request for guzzlehttp/psr7 (locked at 2.1.0) -> satisfiable by guzzlehttp/psr7[2.1.0].

Installation failed, reverting ./composer.json to its original content.

Can anyone help me to resolve this issue please..

DarkBee
  • 16,592
  • 6
  • 46
  • 58
  • 1
    Especially: any of your other packages seems to require `guzzlehttp/psr7` in v2, while the package you want to require now depends on `guzzlehttp/psr7` in v1. You could check which one is the culprit, or ask the maintainers of `beyondcode/laravel-websockets` to release a new version that is compatible – Nico Haase Jan 11 '22 at 07:53
  • change guzzlehttp version in composer.js and run comoser update "guzzlehttp/guzzle": "^7.0.1", – Usman Jan 11 '22 at 08:05
  • Thank you @Usman, I have succeed to install beyondcode/laravel-websockets after downgrading "guzzlehttp/guzzle" version as you have suggested, by for me it was required version "^1.5". – Ecom Constantine Jan 11 '22 at 09:10

1 Answers1

0

Downgrade the guzzlehttp/guzzle version

Do changes in composer.json These are according to Laravel 8 and PHP 8.0

Try downgrading or upgrading until it starts work.

"php": "^7.3|^8.0",

"beyondcode/laravel-websockets": "^1.12"

"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.40",

Usman
  • 339
  • 3
  • 15