yannoff / handyman
A basic REPL for symfony applications
1.0.0
2023-10-19 08:30 UTC
Requires
- php: >= 7.0
- composer-runtime-api: ^2.0
- ext-readline: *
- yannoff/console: ^2.0
Requires (Dev)
- symfony/dependency-injection: ^3.4 || ^4.4 || ^5.4 || ^6.0
- symfony/dotenv: ^3.4 || ^4.4 || ^5.4 || ^6.0
- symfony/filesystem: ^3.4 || ^4.4 || ^5.4 || ^6.0
- symfony/http-kernel: ^3.4 || ^4.4 || ^5.4 || ^6.0
This package is auto-updated.
Last update: 2024-12-10 00:41:49 UTC
README
A basic REPL for symfony applications
Installation
Using composer:
composer require --dev yannoff/handyman
Usage
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.
Example
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.
Options
--kernel
Alternative application's kernel fully-qualfied class name (instead of App\Kernel
)
--working-dir
Optional override for the %kernel.project_dir%
value
--verbose
Turn on verbose mode
License
Licensed under the MIT Licence.