Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[L5.4] Fix views tab #589

Merged
merged 2 commits into from
Jan 18, 2017
Merged

[L5.4] Fix views tab #589

merged 2 commits into from
Jan 18, 2017

Conversation

kamui545
Copy link
Contributor

FatalThrowableError in ViewCollector.php line 53:
Type error: Argument 1 passed to Barryvdh\Debugbar\DataCollector\ViewCollector::addView() must be an instance of Illuminate\View\View, string given, called in /data/mld/prod/vendor/barryvdh/laravel-debugbar/src/LaravelDebugbar.php on line 202

You should bump the version of the package as it is probably a breaking change and won't work for 5.3.

@barryvdh
Copy link
Owner

can't we add a check to support both?

function ($view, $data = []) use ($debugbar) {
    if ($data) {
        $view = $data[0];  // For Laravel >= 5.4
    }
    $debugbar['views']->addView($view);
}

@kamui545
Copy link
Contributor Author

Yeah, I've thought about it actually. I will test and update.

@kamui545
Copy link
Contributor Author

Tested on few 5.3/5.4 apps, looks good.

@barryvdh barryvdh merged commit 4d9e7df into barryvdh:master Jan 18, 2017
@barryvdh
Copy link
Owner

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants