-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WebServerBundle] Store pid file in project directory instead #29160
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
Comments
note you can specify the |
I know, but still, I think the default makes little sense. Bad DX to me. |
can't we store it in the cache dir? |
I'm not sure we want the pid file to be deleted when running This pid file holds server state, and in the linux philosophy this would belong to directory Any objection to use the project directory as the default pid file location? |
The cache dir is not deleted on cache:clear |
Would be fine, then! |
I picked this issue when working during the #SymfonyConHackday2018 in Lisbon and I'm not sure if using the the root cache directory ( The naive implementation could be just: Using the project directory ( |
…to cache directory (jschaedl) This PR was squashed before being merged into the 4.3-dev branch (closes #31280). Discussion ---------- [WebServerBundle] Change the default pidfile location to cache directory | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #29160 <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | tbd. <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Commits ------- 2e14b6e [WebServerBundle] Change the default pidfile location to cache directory
Description
Commit 6f689d6 introduced a pid file to keep track of the servers that have been started using command
server:start
. As stated in the pull request description:The current directory is the directory where the shell command was launched, and not necessarily the project directory. This can lead to wrong reports if the same command is run twice from different directories, or if different servers (from different apps) are started from the same directory.
For these reasons, I suggest using the project directory instead.
Example (same app, change current directory)
Before
php bin/console server:start // [OK] Server listening on http://127.0.0.1:8000 cd bin php console server:start // [OK] Server listening on http://127.0.0.1:8001
After
Another example (different apps, same directory)
Before
After
What do you think?
The text was updated successfully, but these errors were encountered: