Skip to content

[DX] Show a message if server:start is missing pcntl #12153

@weaverryan

Description

@weaverryan

Hi guys!

We now have the server:start and server:stop commands, but they require the pcntl extension. If this extension is not available, the isEnabled() 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:

  1. Removing the pctnl check from isEnabled
  2. Checking for pcntl inside execute() and returning a very clear message if it is missing:

This command needs the pcntl extension to run. You can either install this, or use the server:run command instead to run the built-in web server.

Or alternatively we could actually say:

This command needs the pctnl extension to run. Since this extension is not installed, we'll instead start the built-in web server using the server:run command

... 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:

Quick the server with CONTROL+C.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConsoleFrameworkBundleGood first issueIdeal for your first contribution! (some Symfony experience may be required)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions