-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DX] Show a message if server:start is missing pcntl #12153
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
@weaverryan I like your proposal 👍 |
This adds a question about the usefulness of the
I'm not sure about this, as it would mean that we would block the terminal now, while the user asked to run a command which was not blocking it (thus, running a command from another one is kind of painful). |
Shall we introduce a new |
@hhamon no you cannot. disabled commands are excluded from the command search in the application. In practice, it looks the same than not registering the command at all (except that the logic can be dynamic) |
I think it's okay to make an exception for the server commands to be shown if the PCNTL extension. This really improves the developer's experience when they are at least able to execute commands that have an important part in the documentation (not yet but we are working on this). However, I agree that we shouldn't start the |
So I think we have some agreement:
We'll definitely want this for 2.6 :). |
@weaverryan I think you meant |
@xabbuh Yes thanks - I fixed my comment! |
👍 |
see #12253 |
This PR was merged into the 2.6-dev branch. Discussion ---------- [FrameworkBundle] improve server commands feedback | Q | A | ------------- | --- | Bug fix? | no | New feature? | kind of | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #12153 | License | MIT | Doc PR | * display a message when `server:start` is executed and the PCNTL extension is not loaded * print instructions about how to terminate the `server:run` command Commits ------- bf174cf [FrameworkBundle] improve server commands feedback
Hi guys!
We now have the
server:start
andserver:stop
commands, but they require thepcntl
extension. If this extension is not available, theisEnabled()
function return false, so the commands are completely not available.I think this may cause "wtf" moments for users - especially if they're following docs that say to use
server:start
. Instead, I'd propose:pctnl
check fromisEnabled
pcntl
insideexecute()
and returning a very clear message if it is missing:Or alternatively we could actually say:
... and then we would actually call the
server:run
command for them.Also, why not print a message at the bottom of
server:run
that says:I've "borrowed" the language even from Django (https://docs.djangoproject.com/en/1.7/intro/tutorial01/#the-development-server), so there is some precedence for that :).
ping @xabbuh
The text was updated successfully, but these errors were encountered: