WebSocketBundle
WebSocketBundle copied to clipboard
Error to install composer
I have this error when execute composer:
You have requested a non-existent parameter "gos_web_socket.server.host"
problem? thanks!
What version of the bundle?
It's been a long while since I've done a fresh install into a Symfony application, but IIRC the bundle's default configuration causes that error on a totally new install until you set things up. And, last time I tried creating a recipe for the bundle I just ran into too many quirks with the recipe checker to make it work efficiently, so I haven't tried again to be able to avoid the initial error message.
Try this as a baseline for the bundle config, place it at config/packages/gos_web_socket.yaml
:
parameters:
# Adds fallback params in case the corresponding env vars are not set.
# This allows you to run cache:warmup even if your
# environment variables are not available yet.
# You should not need to change this value.
env(GOS_WEB_SOCKET_SERVER_IP): '127.0.0.1'
env(GOS_WEB_SOCKET_SERVER_PORT): 1337
gos_web_socket:
server:
port: '%env(int:GOS_WEB_SOCKET_SERVER_PORT)%' # The port the socket server will listen on
host: '%env(GOS_WEB_SOCKET_SERVER_IP)%' # The host ip to bind to
router:
resources:
-
resource: '%kernel.project_dir%/config/pubsub/websocket/*'
type: 'glob'
I have the same problem - I tried to install version >=3.4.0 and get the same error message:
You have requested a non-existent parameter "gos_web_socket.server.host".
After having added config/packages/gos_web_socket.yaml I ran the installation a second time - but this time I get the error:
!! In FileLocator.php line 44:
!!
!! The file "/
Create the config/pubsub/websocket
directory.
If I can find time, I'll see if I can make a recipe for 3.0 that works and maybe that helps with some of the initial install struggles. When I tried the recipe last, it was for 2.3 and it just did not go well at all because of the wider range of supported PubSubRouterBundle versions (if anyone cares, https://github.com/symfony/recipes-contrib/pull/881 was the recipe which is pretty much the exact same advice here just automated).
This works when I do the two steps mentioned above 👍
Hi , i have the same issue on "composer require gos/web-socket-bundle"
"You have requested a non-existent parameter "gos_web_socket.server.host""
My gos_web_socket.yaml file exist in config/packages/gos_web_socket.yaml
What can i do ?