bugsnag / bugsnag-laravel

BugSnag notifier for the Laravel PHP framework. Monitor and report Laravel errors.
https://docs.bugsnag.com/platforms/php/laravel/
MIT License
876 stars 129 forks source link

Update Laravel and Lumen examples #401

Closed imjoehaines closed 4 years ago

imjoehaines commented 4 years ago

I've completely redone the example directory so that it now has examples for 5.2, 5.8, 6 and 7 of Laravel and Lumen. This represents most of our supported versions — we do support 5.1 but it's trickier to get running and we didn't have an example for it before. This also clarifies the naming of the examples so that the version number is in the directory name (previously we had laravel and lumen which were both on version 5.2). The example directory now looks like this:

laravel-5.2/
laravel-5.8/
laravel-6/
laravel-7/
lumen-5.2/
lumen-5.8/
lumen-6/
lumen-7/

Some of the readmes in the examples were the Laravel/Lumen skeleton readme, rather than customised to the example so I've updated those

I also updated the Lumen examples to render a "JSON" repsonse as the index route (it's actually HTML so that it can have links)

image

This makes it clearer how to use the examples — previously you had to check the routes file for the test route. Most of the examples that existed for Laravel were missing so I've added those too

Finally I've added Laravel 6.0 and 7.0 to Travis too. There's probably no real danger that something works on 5.x and the latest versions of 6/7 but not 6.0 or 7.0 but it feels a bit safer to me. I managed to speed up the build by ~25 minutes even with the extra 4 jobs, by enabling caching and downloading packages rather than cloning them from source