-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
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:
- Removing the
pctnl
check fromisEnabled
- Checking for
pcntl
insideexecute()
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 theserver: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 theserver: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