Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Butch's avatar
Level 1

Upgrading 10 to 11 and use new file structure

I have a Laravel 10x app that I have composer update'd to 11x.

The existing file structure wasn't updated to the new "slim skeleton" that 11 now has and the change log states:

However, we do not recommend that Laravel 10 applications upgrading to Laravel 11 attempt to migrate their application structure, as Laravel 11 has been carefully tuned to also support the Laravel 10 application structure.

What are we meant to do with it now then?

  1. Do I ignore the new app structure and use the old?
  2. Manually copy files/directories from a base install into my app?
  3. Go the other way and start with a fresh 11x and copy my code into that?
  4. Run some script?

Why this is a problem (and why I want to migrate to the new structure) is things like scheduled tasks for example. How/where these are configured/defined is different between 10 and 11 and changes like that will only get worse overtime.

I don't have a lot of experience updating Laravel so not sure what to do. I'm assuming I do 3 - seems odd/dirty though.

0 likes
8 replies
Snapey's avatar
Snapey
Best Answer
Level 122

3 will take less time than you might expect.

You can also use Laravel Shift which will move to the new structure for you.

1 like
Butch's avatar
Level 1

@Snapey

It's a bit of a chore. Would you do this:

  1. in a new branch based off the current master and delete "all the things"
  2. In a new empty branch and copy just my code into it (would have to copy code elsewhere before switch)
  3. In a new repo entirely.

3 seems the easiest/less risk also pretty atomic and "unversion control-y"

Appreciate the advice

Butch's avatar
Level 1

@sm3rter 11 came out over 7 months ago. 10 stopped bug fixes in August. I'd say it's time.

sm3rter's avatar

@Butch POV if I were in your position and didn't have any issues with the current web application or didn't need any features from Laravel 11, I would stick with Laravel 10.x for my existing application. Additionally, some web applications still run on Laravel 9.x versions without encountering any problems.

Butch's avatar
Level 1

@sm3rter Appreciate your input.

Context of this is a recently launched app that for the client is mission critical. Locking/mothballing it now at its earliest launch into a (any) version isn't really an option. In the future, these issues are just going to exacerbate into an untenable state. There's a lot of future dev on this that to start with a mismatch now going to be tough going forward.

Snapey's avatar

I would start a new project and duplicate all the code into it.

You should have no problems copying most code over (routes, models, controllers, form requests, mailables, jobs, migrations, etc will all work with no changes.

Some work to upgrade service providers, scheduler, middleware registration

You would have to lose git history with this approach

Butch's avatar
Level 1

@Snapey

From losing the git history comment, project = repo in what you're saying. Create a whole new repo and migrate existing into it. Okay, I can live with that. Seems a little criminal and reminds me of why I abandoned Laravel in its early releases.

Makes it more awkward but clearer on what I need to do. Cheers.

Please or to participate in this conversation.