A basic REPL for symfony applications
Using composer:
composer require --dev yannoff/handyman
Call the REPL script from the application top-level directory:
vendor/bin/handyman
Depending on the main
composer.json
config, a link to the script may be available in thebin/
directory.
PHP> print_r(get_class_methods(self::get('slugger')));;
Array
(
[0] => __construct
[1] => setLocale
[2] => getLocale
[3] => slug
)
PHP> echo self::get('slugger')->slug('this is my text')
PHP> // Note: to trigger eval, line must end with a double semi-colon (;;)
PHP> ;;
this-is-my-text
PHP>
Code will be eval'd as soon as two semi-colons (
;;
) are detected in the line end.
Alternative application's kernel fully-qualfied class name (instead of App\Kernel
)
Optional override for the %kernel.project_dir%
value
Turn on verbose mode
Licensed under the MIT Licence.