yannoff / handyman
symfony 应用的基本 REPL
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-09-09 23:55:40 UTC
README
symfony 应用的基本 REPL
安装
使用 composer
composer require --dev yannoff/handyman
用法
从应用程序顶层目录调用 REPL 脚本
vendor/bin/handyman
根据 主要
composer.json
配置,脚本链接可能存在于bin/
目录中。
示例
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>
代码将在检测到行尾有两个分号(
;;
)时立即执行。
选项
--kernel
替代应用程序的完整类名(而非 App\Kernel
)
--working-dir
可选的覆盖 %kernel.project_dir%
值
--verbose
开启详细模式
许可
在 MIT 许可证 下授权。