Yes, it has been removed. The current plain screen is the default from Symfony. Maybe it will be re-included before final release. Last but not least you can pull it in manually.
Whoops! removed from Laravel 5?
I just updated my development build to the newest revision of laravel, and I realized my exception pages are no longer handled by the filp/whoops package. Did Taylor remove this intentionally?
Instead it's replaced by a plain white exception screen which just states "Whoops. Something went wrong" with a stacktrace. It's not near as helpful or as easy on the eyes as the Whoops! package was.
Any ideas if this might be making it back into the project? Or what it might take for me to re-implement it?
Thanks!
I noticed that too, not a fan of the one now but I don't really need any more information than what it provides. The rest, I can figure out easy enough while debugging, if necessary.
hope it will available in final version as I know Taylor intended to remove it from 4.2 also.
You can add it pretty easily
composer require filp/whoops:~1.0
The register this code, maybe wrap it in a check for debug mode.
$whoops = new \Whoops\Run;
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
$whoops->register();
FYI: I created a new ErrorServiceProvider.php
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Whoops\Handler\PrettyPageHandler;
use Whoops\Run;
class ErrorServiceProvider extends ServiceProvider {
/**
* Register any error handlers.
*
* @return void
*/
public function boot()
{
$whoops = new Run;
$whoops->pushHandler(new PrettyPageHandler);
$whoops->register();
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
//
}
}
Added package to composer.json:
"filp/whoops": "~1.0"
And finally registered the provider in app.php
'providers' => [
/*
* Application Service Providers...
*/
'App\Providers\EventServiceProvider',
'App\Providers\RouteServiceProvider',
'App\Providers\ErrorServiceProvider',
/*
* Laravel Framework Service Providers...
*/
[...]
],
There you go!
You can add it pretty easily
This is starting to become the tagline of L5
routes.php? You can add it pretty easily.
Str:: facade? You can add it pretty easily.
Forms/HTML helpers? You can add it pretty easily.
Whoops? You can add it pretty easily.
Str.php isn't a facade. They just removed the alias. So no real issue there.
Some people are upset about the form/html helpers being removed, but, again, can we really complain if it only takes a matter of seconds to bring it back?
Yeah I agree, it's easy to add back in but currently you have to search around a bit to know how to. Also, if there's 100 things that "only take a few seconds", you'll end up having to spend ages doing them if so.
Hopefully there's good documentation on it when it's fully out and stable :)
You could always fork laravel and add all these things back in :P
@JeffreyWay, Fair enough, but the issue is that the helper functions don't expose all of the Str.php methods the way the alias did. Str::slug() has no equivalent helper function, even though it's one of the most useful string functions afforded by the framework.
Maybe this is an oversight, but I don't see why the alias had to be removed in the first place.
You may comment on the commit if you wish: https://github.com/laravel/framework/commit/62ae860596f17a80954c106ff179288205a74d78#commitcomment-8231235
While it's true you can add some of these back, i.e. form helpers, how many actually write an app that would not use a form helper? Seems like it would be better to include it for the majority, then the minority would have to remove it.
@magnetion I never used the form helpers :) I like to keep my views clean! But I don't use blade either! I use twig as a template engine and for most of the stuff the form helpers provide I have macros in my views I can easily tweak!
@unitedworx, that's great for you, that you have all of that already set up. But then if you do, the inclusion of the form/HTML helpers shouldn't bother you either way. Meanwhile those who aren't going to go through the boilerplate of substituting blade for twig, and create macros, still want a non-boilerplate out-of-the-box solution so we can go from installation to being productive in the shortest time possible.
This is like the Windows 8 of Laravels. Taking start menus out and making it hard to find the shutdown option :D
Dont forget that laravel is a framework that you will use to build an app with thousand lines of code! You pick a lot of stuff to use or not. There are endless ways to structure your app. I have like 10 packages that I use already in an app which is not even half way completed!
A few stuff are not in there and are optinal, that's fine, you will include it and use it if you rely on it, and in a few months that a better package is available by a 3rd party you will use that instead and do on.
It's fine that a few things are left out of the laravel core, there are endless stuff that could be in there out of the box. keeping stuff out means focusing on other more important stuff.
I could argue that packages like sluggable, sentry, debugbar, interventionimage, idenelper should be built in since they are dead useful. But they are not build in for a reason! You have to draw a line between what's in and what's out of the box. Clearly html/helpers are no longer in there. There are endless ways you can handle them.
Ehh, this negativity is depressing. Change is not bad, people are just too lazy to learn something new.
As for Windows, the hotkeys still exist and are what I switched to using primarily... Win + S to open programs or shutdown, Win + L to lock, Win + Arrows to Maximize, Restore, Align to Side, Win + Shift + Arrow to move window to another monitor, etc... You can also right click the bottom left and get a lot of options such as shutdown, control panel, etc. All very easy/accessible.
Yea, I liked the old Whoops page better, but this one is just as functional. I don't think I ever used the environment variables section or anything on the old error pages while debugging.
Regardless, look at the overall quality of Laravel and it's ridiculous simplicity... Taylor managed to make it into what it is today, and I fully trust that he has the ability to make it better. Feedback is always helpful, but pointless banter and analogies or comparisons don't help anything and actually decrease the overall quality of a community.
+1 @unitedworx :)
I think you're taking it a bit too seriously :P
Breaking changes in a new major version is serious internet business.
How am I supposed to use my finger-paints if I have to open them manually?
Help Me Obama!
I think it won't take long before laravel needs a "configure your version and download" just like when you get jquery ui or zurb foundation, where they have checkboxes so you pick what you want included lol
@henrique sounds like a good idea for a simple build site to index these packages and build a composer require block ;)
@Devon, I'm not trying to be negative at all. I was simply wondering if it was intentionally removed or if I did something wrong after merging the new laravel/laravel package with my build. I thought maybe I had missed a service provider that registered the Whoops! package.
I did look through his commits before posting, and saw where he did remove it -- I just didn't know if it had been moved or REmoved.
I love Laravel, I have nothing negative to say about it. I do prefer the Whoops page over the bland Symfony exception page, and I did manually install Whoops to get it back, I was mostly just curious.
Just my opinion, but it SHOULD be added back into the package. When I first started using Laravel the amazingly helpful and well-designed exception page was a huge "wow" factor for me. It gave Laravel a well-built and professional feel even when it was broken.
Thank you all for your answers! @JeffreyWay - you have a great site here and you do amazing work. Keep it up!
I am sure that most of the stuff that will be out of the core will be mentioned in the upgrade guide from L4 to L5
I guess that calling it 5 instead of 4.3 gave Taylor the freedom to break more stuff and push this a bit further forward than tying to keep things as backwards compatible as possible!
@bashy, no kidding.
When I saw this post by Taylor I thought "Yes! don't make it complicated!".
I don't want Laravel to turn into Symfony, but I also don't want it to turn into Slim...
@tag Haha yeah, that's why Laravel is so great. It's different and it's the best of both worlds in terms of what it does and how.
Sure tools get more complex but they shouldn't get harder to use.
We shall see next year on how Laravel is.
@tag - interesting tweet of Taylor's. Actually, I feel a little lost with jargon such as "middleware more consistent than filters in signature". WTH is this supposed to mean for real people? Those could in contrast say, in the spirit of simplicity, the term "filter" used to be quite telling of what was going on, i.e. requests got filtered before or after. Whereas "middleware" rings no bells whatsover [at least for me] except the wrong ones [Tibco, WebSphere...] and is telling no more than, middlewares will be middlewaring something or so. Maybe a matter of defining "newcomers": I think Taylor is rather focused on senior folks moving on from ZF, Symfony, etc., not unexperienced newbies. That would explain some not hugely popular decisions of his of late, incl. the whoops one. Whether smart or not, only market share over time will tell.
@rspahni, Middleware has more purpose than simple filters... They are ware (stuff) that are executed in the middle of the stack...
They can be used on routes, but they are also used to encrypt cookies, render maintenance mode, and several other things.
People didn't know what a service provider was either, when Laravel 4 came out. A small bit of education, and then everyone will know what the term middleware refers to.
I feel like @rspahni, too. In my opinion L5 will become a more "technical" framework than it was before. The spirit behind the framework becomes more and more unimportant over terms of OOP.
On the L3 frontpage there was a sentence like
"ALL THE COOL KIDS ARE DOING IT - Laravel has brought the fun back to programming; it’s so expressive it speaks my language."
It's a step into the future now. Some people will like it, some won't. For me the current L5 dev branch helps me to dive more and more into OOP than I did before. When you try to find out why thinks not work anymore, as it did before, you have to tinker around with that stuff which helps to understand the part under the hood.
I think Laravel 5 will become an amazing release with tons of improvements and changes. So let's see where the journey is heading to!
For what it's worth, I'm capable of abstraction and can cope with the filter > middleware transition. Yet, I can say as well, I came to Laravel last December after having been turned off big time by ZF2 and all the ridiculous jargon and sophisticatedness that it involved. With L5 moving in a Symfony direction, the differential in my eyes has reduced significantly. Not the end of the world but IMO taking away some of Laravel's distinctiveness and diluting its original claim of "accessible/elegant/expressive". Again, market share over time will tell whether this was slam dunk of Taylor or rather the opposite. Btw, I'm a super early L5 adopter.
Please or to participate in this conversation.