The package overrides the default Laravel's VarDumpers and file context disappears
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
调研方向
首先检查 DumpServerServiceProvider,并重现有无 php artisan dump-server 时的差异,重点关注 Laravel 的 HtmlDumper 和 CliDumper 处理器。查看 package 如何注册 VarDumper,以及如何启用 command;当 command 未运行时文件上下文仍保持可见,且不破坏 dump-server 的行为时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
When this package is installed, it overrides VarDumper handler that comes from Laravel (Illuminate\Foundation\Http\HtmlDumper and Illuminate\Foundation\Console\CliDumper).
To compare, when the package is not installed:
And when it is installed, but the command not running:
The same in CLI.
When the command (php artisan dump-server) is not running, I would like to see the file context by default.
Suggestion:
As a suggestion, maybe the setting could be introduced to enable/disable the package? E.g. config:
...
'enabled' => env('DUMP_SERVER_ENABLED', true),
...
Then in DumpServerServiceProvider it could be conditionally loaded:
if ($this->app['config']->get('debug-server.enabled')) {
VarDumper::setHandler(function ($var) use ($connection) {
$this->app->makeWith(Dumper::class, ['connection' => $connection])->dump($var);
});
}
The command php artisan dump-server could give an error if it is not enabled:
if (! config('dump-server.enabled')) {
$this->error('The dump server is not enabled.');
return;
}
This would allow users to choose if they want it always enabled, or occasionally and would not override other VarDump registered handlers.
WDYT, I could open a pull request if it's reasonable idea.
- 主要语言
- PHP
- 星标
- 1.6k
- 派生
- 90
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
beyondcode/laravel-dump-server 的其他 Issue
-
Laravel 13未关闭
难度 4/5 3-5 天 新手友好度 42/100
beyondcode/laravel-dump-server#106 · 6 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 38/100
beyondcode/laravel-dump-server#52 · 2 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
beyondcode/laravel-dump-server#51 · 4 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 3/5 1-2 天 新手友好度 38/100
beyondcode/laravel-dump-server#40 · 1 个 reaction ·
查看 beyondcode/laravel-dump-server 的全部 Issue
相似的 Issue
-
sync-en
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
bug-report bug-report-triage
难度 2/5 1-3 小时 新手友好度 72/100
Codeinwp/templates-patterns-collection#539 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
WINBIGFOX/TimeScribe#143 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
coollabsio/coolify#12287 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 3 天内回复