8000 Support listen_ip in .symfony.local.yaml · Issue #529 · symfony-cli/symfony-cli · GitHub
[go: up one dir, main page]

Skip to content

Support listen_ip in .symfony.local.yaml #529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tft7000 opened this issue Oct 25, 2024 · 3 comments
Open

Support listen_ip in .symfony.local.yaml #529

tft7000 opened this issue Oct 25, 2024 · 3 comments

Comments

@tft7000
Copy link
tft7000 commented Oct 25, 2024

With v5.10.3 (#494) the previous default behaviour of binding to 0.0.0.0 for the symfony server was removed. In v5.10.4 (#525) the old behaviour got supported again with the command line flags allow-all-ip or listen-ip.

As those feature changes are kind of breaking changes in certain project situations, I would suggest to support the above flags also in the .symfony.local.yaml to minimize the impact of the change to just adapting the general symfony config file of the project.

I am not sure, if that just means changing local/project/config.go line 38 to

ListenIp      string `yaml:"listen_ip"`

As there is is no AllowAllIp config option, maybe that is also not necessary for the yaml file (I could set the listen_ip to 0.0.0.0 or maybe set it to empty string, if I want that behaviour).

@tucksaun
Copy link
Member

I didn't implemented the option in the .symfony.local.yaml configuration file because it does not make sense IMHO: this file is potentially shared among developers, yet they don't share any IP that can be configure here.

At the moment, the best course of action if one wants to restore the previous behaviour all the time is to define SYMFONY_ALLOW_ALL_IP=true in their environment.

@tft7000
Copy link
Author
tft7000 commented Oct 25, 2024

@tucksaun : thank you for your insight.

For my use case: we do share the local IP for all developers, so that is why it is a breaking change for us (we use a custom defined host only IP that helps us to communicate between container and host applications without barriers).

I think adding it to the symfony.local.yaml would help:
if you don't need it, you don't need to set that option. However if you are in an environment, where you need to specifiy the IP, you can.

Also I can imagine that there is a use case where you want to bind to 0.0.0.0, because your setup needs to be testable by other developers in your network. Think pair-programming and similar setups.

@tucksaun
Copy link
Member
tucksaun commented Dec 7, 2024

I believe setting allow_http: true in your .symfony.local.yaml will cover this use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants
0