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
wp-env: consideration of active ports #49843
Comments
@HeikoMamerow Thanks for reaching out.
PRs are definitely welcome. The only thing is that It looks like only simple documentation changes have been merged in the last six months. So you may want to make a call on the effort/reward. |
Happy to review and test a PR for this based on your existing script! I would expect it to run during wp-env start, and I think it would be fine for it to be unique each time. If people need the port to stay the same, they can set it in .wp-env.json |
Thank you very much for your answers! This makes me very confident that it is worthwhile to implement this task. I will start the implementation next week. @noahtallen I completely agree with you. Port management should be done by default at startup. I think it should be so that the original default ports (8888/8889) are checked first and if already active, then another one will used that is not yet active. The port management should also be optionally "deactivatable", so that it is possible to define own ports. |
Aaargh, I had completed my changes and now wanted to start a PR. But after the sync I see that the origin port handling was completely rewritten. 😢 However - this was my changes: trunk...HeikoMamerow:gutenberg:env/feat/port_management What now? Of course my changes do not work with the current version. I may start again... How can this be better coordinated? What can i do? |
What problem does this address?
wp-env is a very fast and handy tool if you can use it "out of the box" - without configuration. However, most of the time I have to configure custom ports because the default port (8888) is already occupied on my machine. This is very time consuming and annoying.
What is your proposed solution?
The problem can be solved by generating a random port number and check if this port is already open. If the port is open, then a new number is generated and checked.
I had already written a helper script for this task: https://github.com/HeikoMamerow/wp-env-port-stamp
Is it possible to include such a port check in wp-env? I could develop the feature and submit it as PR if that's ok.
PS: I have no experience with contributions for Gutenberg so far. 🙈 But i am very interested to include this feature. 💪
The text was updated successfully, but these errors were encountered: