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

[5.8] Resolve Blade facade to named service #25497

Merged
merged 1 commit into from
Sep 7, 2018

Conversation

franzliedke
Copy link
Contributor

Next shot at #25391.

This time I am sending it to 5.8, so that we have plenty of time to find out if this causes any problems.
Which I doubt, because...

I am assuming it was just there because the first version of the ViewServiceProvider did not register a binding for the Blade compiler.

Also, I'd love some feedback on this:

The only other facade that does not return a string from getFacadeAccessor() is the Schema facade.

If we replace that logic with a binding (we'd have to register a new one), we could get rid of some complexity because we could require all facades to return a string from that method.

@taylorotwell taylorotwell merged commit ee02df8 into laravel:master Sep 7, 2018
@franzliedke franzliedke deleted the 5.8-blade-facade branch September 7, 2018 14:24
franzliedke added a commit to franzliedke/framework that referenced this pull request Sep 7, 2018
Because of laravel#25497 and laravel#25512, all facades in core are now properly
using service identifiers (strings) for resolving their "root"
service from the container. This means that the hack for resolving
objects directly can now be removed.

In case you're wondering why this is necessary: As far as I can
tell, facade features like ::swap() did not work with these types
of facades (Blade and Schema), because those methods did not deal
with the possibility of objects being returned.
taylorotwell pushed a commit that referenced this pull request Sep 10, 2018
Because of #25497 and #25512, all facades in core are now properly
using service identifiers (strings) for resolving their "root"
service from the container. This means that the hack for resolving
objects directly can now be removed.

In case you're wondering why this is necessary: As far as I can
tell, facade features like ::swap() did not work with these types
of facades (Blade and Schema), because those methods did not deal
with the possibility of objects being returned.
jerodev added a commit to jerodev/laravel-font-awesome that referenced this pull request Aug 30, 2019
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