GeniusesOfSymfony / WebSocketBundle

:part_alternation_mark: Websocket server for Symfony applications (powered by Ratchet), includes a Autobahn.JS based JavaScript client
MIT License
610 stars 139 forks source link

react/socket: ^0.5 dependency problem #260

Closed zmitic closed 6 years ago

zmitic commented 7 years ago

I am using phppm library and it requires react/socket: ^0.5. One of the dependencies of your bundle is gos/ratchet with this dependency:

"react/socket": "^0.3 || ^0.4"

which makes the installation fail.

So what I did is to put this into my composer.json:

"react/socket": "0.5.1 as 0.3.4",

and installation passed (I still need to test it this works).


Update: As I expected, it didn't work. When I run ./bin/console gos:websocket:server I get this error (full path is cut):

Type error: Too few arguments to function React\Socket\Server::__construct(), 1 passed in .../vendor/gos/web-socket-bundle/Server/Type/WebSocketServer.php on line 128 and at least 2 expected

I could remove phppm and it will work (been using your bundle before) but I would prefer to keep using it as I get around 10-15 times faster application, for free.

Can you upgrade the bundle to work with react/socket: ^0.5? If not, can you give some advice on how to decorate this service?

SimonHeimberg commented 6 years ago

I have also problems with the dependency on react/socket. 😩

ratchetphp/Ratchet (origin of gos/ratchet) has released version 0.4 some days ago. It depends on "react/socket": "^1.0 || ^0.8 || ^0.7 || ^0.6 || ^0.5" . Can this version be merged maybe?

OO00O0O commented 6 years ago

You can fix it by yourself with fork, and use your own fork for some time, until pull request will be merged.

andreybolonin commented 6 years ago

https://github.com/GeniusesOfSymfony/Ratchet/pull/5

edusalguero commented 6 years ago

@zmitic, see #283. I think that could be interesting for you.

zmitic commented 6 years ago

@edusalguero Thanks mate, I will give it a try :+1:

jjsaunier commented 6 years ago

The latest version 1.8.12-rc1 is solving this issue by removing the custom gos/ratchet. Feel free to try to have feedback. Released soon as possible

zmitic commented 6 years ago

Well I am using Symfony4 now, I can't test this until they upgrade their http-kernel dependency. Maybe this issue can be closed, at least for now?