承接 bitsoftsolutions/laravel-reverb-doctor 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bitsoftsolutions/laravel-reverb-doctor

Composer 安装命令:

composer require bitsoftsolutions/laravel-reverb-doctor

包简介

A CLI diagnostic tool that performs comprehensive health checks on Laravel Reverb WebSocket configurations

README 文档

README

Latest Version on Packagist Total Downloads License

A CLI diagnostic tool that performs comprehensive health checks on Laravel Reverb WebSocket configurations. Stop spending hours debugging WebSocket issues — let reverb:doctor diagnose your configuration in seconds.

Features

  • 10 Diagnostic Checks covering the most common Reverb configuration issues
  • Actionable Suggestions for every detected problem
  • Color-coded Output with PASS/FAIL/WARN/SKIP status indicators
  • JSON Output for CI/CD integration
  • Docker/Sail Detection with specific configuration advice
  • SSL Certificate Validation including expiration warnings
  • Zero Dependencies — uses only Laravel core packages

Requirements

  • PHP 8.1+
  • Laravel 10.x, 11.x, or 12.x
  • Laravel Reverb package installed

Installation

composer require bitsoftsolutions/laravel-reverb-doctor --dev

The package will auto-register via Laravel's package discovery.

Usage

Basic Usage

php artisan reverb:doctor

Output Example

  Laravel Reverb Doctor v1.0.0

+----+-----------------------+--------+-----------------------------------------------+
| #  | Check                 | Status | Message                                       |
+----+-----------------------+--------+-----------------------------------------------+
| 1  | Environment Variables | ✓ PASS | All variables present                         |
| 2  | Config Consistency    | ✓ PASS | .env matches config files                     |
| 3  | Broadcast Connection  | ✗ FAIL | Set to 'log', should be 'reverb'              |
| 4  | Port Availability     | ✓ PASS | Port 8080 is available                        |
| 5  | Reverb Process        | ! WARN | Reverb is not running                         |
| 6  | SSL Certificate       | - SKIP | SSL not configured (using HTTP)               |
| 7  | Queue Worker          | ✓ PASS | Queue worker is running                       |
| 8  | Frontend Sync         | ✓ PASS | Frontend and server configs are in sync       |
| 9  | Docker Detection      | - SKIP | Not running in Docker                         |
| 10 | Connection Test       | ✗ FAIL | Cannot connect to localhost:8080              |
+----+-----------------------+--------+-----------------------------------------------+

  ✗ 2 failed, 1 warning, 5 passed, 2 skipped

  Suggested Fixes:

  ✗ Broadcast Connection
    Set BROADCAST_CONNECTION=reverb in your .env file

  ! Reverb Process
    Start Reverb with: php artisan reverb:start

  ✗ Connection Test
    Ensure Reverb is running: php artisan reverb:start

JSON Output (for CI/CD)

php artisan reverb:doctor --json
{
    "version": "1.0.0",
    "timestamp": "2025-12-04T12:00:00+00:00",
    "summary": {
        "passed": 5,
        "failed": 2,
        "warnings": 1,
        "skipped": 2,
        "total": 10
    },
    "checks": [
        {
            "check": "Environment Variables",
            "status": "PASS",
            "message": "All variables present",
            "suggestion": null,
            "details": {}
        }
    ]
}

Detailed Output

php artisan reverb:doctor --detailed

Shows additional diagnostic information for each check, useful for debugging complex issues.

Diagnostic Checks

# Check Description
1 Environment Variables Verifies all required REVERB_* and VITE_REVERB_* variables exist in .env
2 Config Consistency Compares .env values against config/reverb.php and config/broadcasting.php
3 Broadcast Connection Checks BROADCAST_CONNECTION=reverb (critical—defaults to 'log')
4 Port Availability Tests if configured port (default 8080) is available or already in use
5 Reverb Process Detects if php artisan reverb:start is currently running
6 SSL Certificate Validates SSL cert paths exist and are readable; checks expiration
7 Queue Worker Checks if queue worker is running (required for ShouldBroadcast events)
8 Frontend Sync Compares VITE_REVERB_* variables with server-side configuration
9 Docker Detection If Docker/Sail detected, verifies port exposure and host bindings
10 Connection Test Attempts actual WebSocket handshake to configured endpoint

Common Issues Detected

The package recognizes and provides fixes for these common error patterns:

Error Message Root Cause
cURL error 60: SSL certificate problem Valet/Herd self-signed cert not trusted
cURL error 7: Failed to connect Port mismatch or Reverb not running
WebSocket closed before connection SSL handshake failure or Nginx misconfigured
'reverb' is not a supported driver Using deprecated BROADCAST_DRIVER

CI/CD Integration

Use the --json flag and check the exit code:

# GitHub Actions example
- name: Check Reverb Configuration
  run: |
    php artisan reverb:doctor --json > reverb-health.json
    if [ $? -ne 0 ]; then
      echo "Reverb configuration issues detected"
      cat reverb-health.json
      exit 1
    fi

Exit codes:

  • 0 — All checks passed
  • 1 — One or more checks failed

Environment-Specific Notes

Docker / Laravel Sail

When running in Docker, ensure:

  • REVERB_HOST is set to 0.0.0.0 (not localhost)
  • Port is exposed in docker-compose.yml
  • Frontend uses correct host for WebSocket connections

Laravel Valet / Herd

For HTTPS with self-signed certificates:

  • The SSL check will detect Valet/Herd certificate paths
  • Connection tests allow self-signed certs in local environments

Production

For production deployments:

  • Ensure SSL certificates are valid and not expiring soon
  • Queue workers should be running via Supervisor or similar
  • Consider using a process manager for reverb:start

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

The MIT License (MIT). Please see License File for more information.

Credits

bitsoftsolutions/laravel-reverb-doctor 适用场景与选型建议

bitsoftsolutions/laravel-reverb-doctor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「debug」 「websocket」 「laravel」 「doctor」 「Broadcasting」 「diagnostic」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 bitsoftsolutions/laravel-reverb-doctor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 bitsoftsolutions/laravel-reverb-doctor 我们能提供哪些服务?
定制开发 / 二次开发

基于 bitsoftsolutions/laravel-reverb-doctor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 32
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-04