Support Laravel Debugbar 4 (Laravel 13)#27
Conversation
barryvdh/laravel-debugbar ^4 is required for Laravel 13 support. This bumps the dependency from ^3.15 to ^4.2 and adapts the integration code: - Laravel Debugbar 4 removed Barryvdh\Debugbar\SymfonyHttpDriver and now configures its own LaravelHttpDriver, so the manual HTTP-driver wiring in Plugin::register() is removed (and the now-unused SymfonyHttpDriver / SessionManager imports). - Laravel Debugbar 4 performs renderer configuration inside getJavascriptRenderer(). WinterDebugbar now defers to the parent to build/cache the renderer and registers Winter's stylesheet via the renderer asset API, replacing the old custom JavascriptRenderer subclass (removed). - php >= 8.3 to match Laravel 13. PRs that depend on this: wintercms/storm#228, wintercms/winter#1487.
|
Warning Review limit reached
More reviews will be available in 26 minutes and 48 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThis pull request migrates the Winter Debugbar plugin from the Barryvdh Laravel Debugbar library (v3.15.0) to the Fruitcake fork (v4.2) and raises the minimum PHP version to 8.3. The service container registration, service provider, and HTTP middleware are refactored to use the new Fruitcake namespace. The custom JavascriptRenderer class is removed and its CSS injection logic is consolidated into WinterDebugbar.getJavascriptRenderer via the renderer's asset API. Type hints and PHPDoc annotations are added throughout for type safety, and the InjectDebugbar middleware is reimplemented without extending the base Barryvdh middleware. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
composer.json (1)
36-38:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUpdate
dont-discoverto match the new package name.The auto-discovery exclusion still references
barryvdh/laravel-debugbar, but the package is nowfruitcake/laravel-debugbar. This should be updated for consistency and to ensure discovery is properly disabled for the correct package.🔧 Proposed fix
"laravel": { "dont-discover": [ - "barryvdh/laravel-debugbar" + "fruitcake/laravel-debugbar" ] }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@composer.json` around lines 36 - 38, Update the dont-discover entry that currently references "barryvdh/laravel-debugbar" to the new package name "fruitcake/laravel-debugbar" so the auto-discovery exclusion targets the correct package; locate the "dont-discover" array in composer.json and replace the old package string with the new one.
🧹 Nitpick comments (1)
composer.json (1)
28-28: ⚡ Quick win
barryvdh/laravel-debugbarv4.x resolves correctly; switching tofruitcake/laravel-debugbaris optional
composer.jsonstill requiresbarryvdh/laravel-debugbar:^4.2andextra.laravel.dont-discoverexcludesbarryvdh/laravel-debugbar(composer.json:28, 36-38).composer.lockshows Composer installsbarryvdh/laravel-debugbarv4.2.x while sourcing code from thefruitcake/laravel-debugbarrepository, so this should not break dependency resolution.- Updating both the
requireentry and thedont-discoverentry tofruitcake/laravel-debugbaris a consistency/forward-compat improvement, but not required to fix installs.Optional consistency change
- "barryvdh/laravel-debugbar": "^4.2" + "fruitcake/laravel-debugbar": "^4.2"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@composer.json` at line 28, The composer.json currently references "barryvdh/laravel-debugbar" in the require section and excludes that package under extra.laravel.dont-discover; update both the require entry and the dont-discover entry to "fruitcake/laravel-debugbar" to make package naming consistent with the upstream source (change occurrences of the symbol barryvdh/laravel-debugbar to fruitcake/laravel-debugbar), then run Composer validate and composer update to refresh composer.lock if desired.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@composer.json`:
- Around line 36-38: Update the dont-discover entry that currently references
"barryvdh/laravel-debugbar" to the new package name "fruitcake/laravel-debugbar"
so the auto-discovery exclusion targets the correct package; locate the
"dont-discover" array in composer.json and replace the old package string with
the new one.
---
Nitpick comments:
In `@composer.json`:
- Line 28: The composer.json currently references "barryvdh/laravel-debugbar" in
the require section and excludes that package under extra.laravel.dont-discover;
update both the require entry and the dont-discover entry to
"fruitcake/laravel-debugbar" to make package naming consistent with the upstream
source (change occurrences of the symbol barryvdh/laravel-debugbar to
fruitcake/laravel-debugbar), then run Composer validate and composer update to
refresh composer.lock if desired.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fc4a74b1-13ce-47f8-9109-c906c46e526e
📒 Files selected for processing (9)
Plugin.phpclasses/JavascriptRenderer.phpclasses/ServiceProvider.phpclasses/WinterDebugbar.phpcomposer.jsonmiddleware/InjectDebugbar.phpmiddleware/InterpretsAjaxExceptions.phptwig/extension/Debug.phptwig/extension/Stopwatch.php
💤 Files with no reviewable changes (1)
- classes/JavascriptRenderer.php
- Resolve WinterDebugbar via the container so the new LaravelDebugbar(Application, Request) constructor dependencies are injected. - Guard the models collector with hasCollector() (Laravel Debugbar 4 registers a default models collector, causing a duplicate-collector exception). - Only register a Twig profile collector when the php-debugbar bridge class exists (php-debugbar no longer bundles one).
Summary
barryvdh/laravel-debugbar^4is required for Laravel 13 support, so this bumps the dependency from^3.15to^4.2and adapts the integration code accordingly.Depends on the rest of the WinterCMS Laravel 13 work landing:
Changes
barryvdh/laravel-debugbar^3.15.0→^4.2;php>=7.0→>=8.3(Laravel 13 minimum).Barryvdh\Debugbar\SymfonyHttpDriverand now configures its ownLaravelHttpDriver, so the manual HTTP-driver wiring inregister()(and the now-unusedSymfonyHttpDriver/SessionManagerimports) is removed.getJavascriptRenderer().WinterDebugbarnow defers to the parent to build/cache the renderer and registers Winter's stylesheet via the renderer asset API (addAssets()), matching the updated?string ... : JavascriptRenderersignature.Compatibility
Targets Laravel Debugbar 4 / Laravel 13 (Winter 1.3 line).
Related WinterCMS Laravel 13 PRs
Summary by CodeRabbit
Release Notes