sfConsolePlugin - 0.0.2

Provides a php shell with completion capabilities.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source


Provides a php shell with completion capabilities.


  • Install the plugin

    $ symfony plugin:install sfConsolePlugin
  • You're all set !

Use the console

The console is started with the console:run task. You should be able enter any valid PHP code, and the console will try its best to evaluate it.


  • readline support. Basically it means you get an history of what you previously typed
  • Oh, by the way, that history will persist accross sessions
  • Completion for built-in and user defined functions, classes and constants
  • Exceptions are catched and you can get the backtrace separately


Since the code gets eval()'d, and since some parts of PHP like error management are a bit crappy (also, I'm a bit lazy), there are some known limitations that I don't plan to work on:

  • Not loaded classes can not be completed (those loaded with the autoload for example)
  • Variables can't be tab-completed
  • Fatal errors in the eval()'d scripts will terminate the console
  • Error messages and Exceptions' backtraces won't feature useful line numbers

Special commands

  • exit: exits the console (amazing heh)
  • help: not yet implemented
  • backtrace: display the last exception's backtrace if any


  • Support for multi-line constructs
  • Support to run symfony tasks from within the console
  • Better command completion