gokure/hyperf-tinker
Composer 安装命令:
composer require gokure/hyperf-tinker
包简介
A Powerful REPL for the Hyperf framework.
README 文档
README
Installation
composer require gokure/hyperf-tinker
Publish Config
php bin/hyperf.php vendor:publish gokure/hyperf-tinker
Usage
php bin/hyperf.php tinker
Commnads
- run command
>>> $a=1 => 1 >>> $a => 1 >>> define('VERSION', 'v1.0.1') => true >>> VERSION => "v1.0.1" >>>
- The help command
>>> help help Show a list of commands. Type `help [foo]` for information about [foo]. Aliases: ? ls List local, instance or class variables, methods and constants. Aliases: dir dump Dump an object or primitive. doc Read the documentation for an object, class, constant, method or property. Aliases: rtfm, man show Show the code for an object, class, constant, method or property. wtf Show the backtrace of the most recent exception. Aliases: last-exception, wtf? whereami Show where you are in the code. throw-up Throw an exception or error out of the Psy Shell. timeit Profiles with a timer. trace Show the current call stack. buffer Show (or clear) the contents of the code input buffer. Aliases: buf clear Clear the Psy Shell screen. edit Open an external editor. Afterwards, get produced code in input buffer. sudo Evaluate PHP code, bypassing visibility restrictions. history Show the Psy Shell history. Aliases: hist exit End the current session and return to caller. Aliases: quit, q
- get hyperf env
>>> env("APP_NAME") => "skeleton" >>>
- query db
>>> $user = App\Model\User::find(1) => App\Model\User {#84118 id: 1, name: "Gang Wu", email: "gokure@gmail.com", created_at: "2019-03-12 19:07:08", updated_at: "2021-01-25 10:35:22" }
- class alias auto-load
>>> $user = User::find(1) [!] Aliasing 'User' to 'App\Model\User' for this Tinker session. => App\Model\User {#84120 id: 1, name: "Gang Wu", email: "gokure@gmail.com", created_at: "2019-03-12 19:07:08", updated_at: "2021-01-25 10:35:22" } >>> collect([1, 2]) => Hyperf\Utils\Collection {#84084 all: [ 1, 2, ], }
Supported Versions
| Version | Hyperf Version | Php Version | Status |
|---|---|---|---|
| 2.x | ^3.0 | >=8.0 | Mainstream support |
| 1.x | ^1.0|^2.0 | <=7.2|^8.0|^8.1 | Security fixes support |
gokure/hyperf-tinker 适用场景与选型建议
gokure/hyperf-tinker 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23.37k 次下载、GitHub Stars 达 15, 最近一次更新时间为 2021 年 01 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「REPL」 「psysh」 「Tinker」 「hyperf」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 gokure/hyperf-tinker 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 gokure/hyperf-tinker 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 gokure/hyperf-tinker 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bundle to integrate REPL PsySH with Symfony projects
A REPL for the Mako Framework
Interactive debug shell for eZ Publish 5+ apps. Uses PsySH.
A Laravel Artisan SQL Interactive Interface
Tinker on vscode
A port of the PHP REPL PsySH for Symfony 2.x.
统计信息
- 总下载量: 23.37k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-01-25