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

[8.x] Use View contract when rendering Blade components #35920

Merged
merged 1 commit into from Jan 16, 2021

Conversation

inxilpro
Copy link
Contributor

Right now ManagesComponents uses Illuminate\View\View rather than Illuminate\Contracts\View\View which means that components that return a different implementation of the View contract break Blade components.

The only code that uses this import is:

if ($view instanceof View) {
    return $view->with($data)->render();
}

Since with() and render() are both on the view contract, it should be completely safe to swap the implementation for the interface.

@taylorotwell taylorotwell merged commit 8465ecf into laravel:8.x Jan 16, 2021
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.

None yet

2 participants