GeniusesOfSymfony / WebSocketBundle

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

Possible Error in deprecated_aliases.yml ? #406

Closed tejadong closed 4 years ago

tejadong commented 4 years ago

Hello:

I have installed the bundle in symfony 3.4 with php 7.3.15 and when I run the command "php bin/console gos:websocket:server" I get the following errors.

In ReplaceAliasByActualDefinitionPass.php line 57:

Unable to replace alias "gos_web_socket.amqp.pusher" with actual definition "gos_web_socket.pusher.amqp".

In ContainerBuilder.php line 1060:

You have requested a non-existent service "gos_web_socket.pusher.amqp".

If I go into vendor\gos\web-socket-bundle\Resources\config\services\deprecated_aliases.yml and delete all alias definitions, everything works fine.

for what is this? is a bug?

mbabker commented 4 years ago

Removing the deprecated alias "fixes" the issue because it removes the alias from the container, it doesn't actually fix anything though.

That file contains service IDs from the 1.x version of the bundle that were renamed in 2.0, with the aliases kept for backward compatibility.

Starting with the 2.2 release of this bundle, the pusher services are removed from the container when they aren't enabled in your application's configuration. The aliases, however, weren't removed alongside the "real" service definitions. This bug is corrected in 2.3.1.

(On a side note, if you are using any of the service IDs in that deprecated aliases file, you should update your application to use the newer service ID as those aliases are removed in the upcoming 3.0 release)