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?
Do I ignore the new app structure and use the old?
Manually copy files/directories from a base install into my app?
Go the other way and start with a fresh 11x and copy my code into that?
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.
@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.
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.
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
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.