ion-bazan/laravel-container-debug
Composer 安装命令:
composer require ion-bazan/laravel-container-debug
包简介
Lists available services in Laravel IoC Container. Works with Laravel 5.4-13.x
README 文档
README
Symfony-inspired package to list available services in Laravel IoC Container. Works with Laravel 5.4-13.x.
Example output
+--------------------------------------------------------------+-------------------------------------------------------------+--------+-------+
| Service ID | Class | Shared | Alias |
+--------------------------------------------------------------+-------------------------------------------------------------+--------+-------+
| IonBazan\Laravel\ContainerDebug\Tests\IContainerContractStub | IonBazan\Laravel\ContainerDebug\Tests\ContainerConcreteStub | No | No |
| IonBazan\Laravel\ContainerDebug\Tests\SingletonService | IonBazan\Laravel\ContainerDebug\Tests\SingletonService | Yes | No |
| alias.b | alias for "service.b" | No | Yes |
| alias.c | alias for "service.c" | No | Yes |
| service.a | IonBazan\Laravel\ContainerDebug\Tests\ServiceStubA | No | No |
| service.b | IonBazan\Laravel\ContainerDebug\Tests\ServiceStubB | No | No |
| service.c | IonBazan\Laravel\ContainerDebug\Tests\ServiceStubC | No | No |
| service.d | N/A | No | No |
| simple.value.array | <array> [10,20] | No | No |
| simple.value.int | <integer> 10 | No | No |
| simple.value.string | <string> test | No | No |
+--------------------------------------------------------------+-------------------------------------------------------------+--------+-------+
Installation
composer require --dev ion-bazan/laravel-container-debug
Thanks to Laravel's Package Auto-Discovery, you don't need to register the ServiceProvider.
Laravel without auto-discovery
If you don't use auto-discovery, add the Service Provider to the providers array in your config/app.php:
\IonBazan\Laravel\ContainerDebug\ServiceProvider::class,
Lumen
For Lumen, register the Service Provider in your bootstrap/app.php:
$app->register(\IonBazan\Laravel\ContainerDebug\ServiceProvider::class);
Usage
TL;DR: php artisan container:debug --help
Usage is pretty straightforward:
- to list all services:
php artisan container:debug - to check specific service:
php artisan container:debug MyFooService - to list all tags with tagged services:
php artisan container:debug --tags - to list all services with tag:
php artisan container:debug --tag=foo
The command does it best to find the service you want by stripping slashes in service names and looking for any occurrences of given name in service names.
For example, to display service.foo service information, simply use php artisan container:debug foo. If there are more services with the similar name, a prompt will be shown to choose the one you are looking for.
To get the class name of the service, it must be initialized. To check how much time it took for each service, you may use --profile option.
ion-bazan/laravel-container-debug 适用场景与选型建议
ion-bazan/laravel-container-debug 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 88.44k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2020 年 07 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「container」 「debug」 「command」 「laravel」 「services」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ion-bazan/laravel-container-debug 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ion-bazan/laravel-container-debug 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ion-bazan/laravel-container-debug 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Wrapper for exec and it's results
Debug your SimpleBus EventBus and CommandBus
Symfony bundle to monitor and execute commands
nice output for debug functions for PHP 5.3
Shell command module for PHP.
A fast and intuitive dependency injection container.
统计信息
- 总下载量: 88.44k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-07-15