Laravel update to 5.0.16 – important change to stop your stack breaking

After running composer update on my Laravel stack, I was surprised to find a whole bunch of errors and exceptions immediately afterwards. Turns out I needed to do three things:

Update /bootstrap/autoload.php
Laravel’s developers seem to have made quite a large change to the framework (changing the location of some compiled assets for a patch release seems a bit large). In order to get 5.0.16 to work you need to modify the line assigning $compiledPath – should be around line 30 on an unmodified version of the file:

From:

$compiledPath = __DIR__.'/../storage/framework/compiled.php';

To:

$compiledPath = __DIR__.'/../vendor/compiled.php';

Once changed, I then ran the following on my shell (I have the PHP version of composer installed into my project):

$ sudo rm ./vendor/compiled.php
$ sudo artisan clear-compiled
$ sudo php composer.phar update

Boom – that did it!

Lock my composer.json file
I’m totally going to lock the version to a specific point release after this – rather unexpected – update. Sure it’s an experimental Laravel stack, but I want to be experimenting not fixing my stack! While 5.0* should be fairly safe… apparently not!

Imagine if… I had used Laravel’s scheduling to auto-update composer… and then ran that on a production server!

Keep an eye on Laravel’s upgrade page!
Turns out they posted the one line change here. My bad for missing that.

Leave a Reply

Your email address will not be published. Required fields are marked *