-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WebServerBundle] Decouple server commands from the container #21190
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
Conversation
3d74290
to
6495157
Compare
Here is what is needed to replace the bundle by a component and wire it in the framework master...chalasr:webserver-component |
6495157
to
4d2ee9f
Compare
I'm :-0: on this change, but if others thinks it helps, why not. But I'm 👎 on making it a component and tying it to the framework bundle is exactly what I wanted to avoid in the first place. |
I saw it like "these commands should live without the framework" while it was "the framework should live without these commands", got it. I think the first sentence stays good as a "bonus" and this change helps at making it true, decoupling the commands from the framework and from the container (right now they can't be used without both). |
4d2ee9f
to
2e63025
Compare
Regarding my previous comments, I'm totaly in favor of this decoupling.
And again: why not a component and his bundle ?
Also, as the Bundle "require" process component, I don't see how we cant avoid the autoloading of theses commands right now :) |
Thank you @chalasr. |
…ntainer (chalasr) This PR was merged into the 3.3-dev branch. Discussion ---------- [WebServerBundle] Decouple server commands from the container | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20429 | License | MIT | Doc PR | maybe This removes the need for injecting the container in the new `server:*` commands, registering them as services when used in the framework and thus making them even more discoverable and extensible. It would then be easy to reconsider extracting them in a `WebServer` component instead of having a bundle only. IMHO it would make sense to use these commands outside of the framework. If the idea can be considered I'll add some tests at least ensuring that these commands are bootstrap-able. This must be done before that they are covered by the BC promise (3.3). Commits ------- 2e63025 [WebServerBundle] Decouple server:* commands from the container
This removes the need for injecting the container in the new
server:*
commands, registering them as services when used in the framework and thus making them even more discoverable and extensible.It would then be easy to reconsider extracting them in a
WebServer
component instead of having a bundle only. IMHO it would make sense to use these commands outside of the framework.If the idea can be considered I'll add some tests at least ensuring that these commands are bootstrap-able. This must be done before that they are covered by the BC promise (3.3).