Please note any missing pieces, wrong directions, or anything else in the comments. Thanks!
This is trying to catch all framework-related changes that are missing from my post RE upgrading Laravel 4 to 5.
Please note any missing pieces, wrong directions, or anything else in the comments. Thanks!
This is trying to catch all framework-related changes that are missing from my post RE upgrading Laravel 4 to 5.
@mattstauffer @iWader The app/models folder was in the autoload classmap, but I think the idea here is that we need an additional namespace to prefix everything. I.E. I have a folder in L4 app/models/stuff/Thing.php
which is namespace Stuff;
and when copying stuff/*
into the new Laravel 5 app/
folder app/stuff/Thing.php
my namespace needs to prefix App (right?) so namespace App\Stuff;
is what I'm understanding. Will attempt it soon.
@mattstauffer Thanks for putting this list together. Very helpful. Two little things that I came across when upgrading:
Str
alias has been removed from default config/app.php. Most of the string functions are included in Illuminate\Support\Helpers or just add 'Str' => 'Illuminate\Support\Str'
back in to the alias arraylinks()
function can just be changed to render()
@mattstauffer I know I'm late to this party, but I finally moved a site over today and found a couple steps I had to do - we'll see if this helps anyone.
Because we're not creating the project via composer, there are a couple commands that composer doesn't run for us and that we have to do by hand.
First, we need a .env
file that Laravel is happy with. The easiest way to get one is to run cp .env.example .env
. You can then update the new .env file with your settings as described in the article.
We need that .env file in place for the next step. Laravel requires that you set your application key, otherwise you'll get the following error: No supported encrypter found. The cipher and / or key length are invalid. To set the key, just run php artisan key:generate
and a random key will be generated and placed in the .env file.
@mattstauffer Incredibly late to the party, but I've got a couple of comments to make.
First, thanks for the article, it's been a huge help in upgrading my sites and the accompanying package that I use.
Having worked through it all, I'd possibly clarify the git squash comments. Having never used it before, it took me a little while to realize that I didn't need to squash the first of the 3 commits (based on the example of 3 commits that you mentioned). I was trying to squash all 3 rather than just the latter ones. Incredibly useful feature though :)
Also the comment from @jtgrimes could definitely do with being added to the instructions.
@mattstauffer, I run the command git merge laravel/master --squash
but it errors
fatal: refusing to merge unrelated histories
How to solve this please?
^solved via --allow-unrelated-histories
option
Thanks Matt