How to Upgrade Older Projects to Laravel 10

How to Upgrade Older Projects to Laravel 10

Laravel Daily

1 год назад

28,163 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Mahmoud Diab
Mahmoud Diab - 15.09.2023 01:09

In my opinion the best way is to create a new Laravel project and transfer all logic and install all packages then edit the legacy code , I upgraded Laravel project from 7 to 10. the worst thing is the packages but by searching everything will be fine

Ответить
darknmy
darknmy - 02.08.2023 15:31

It's not that easy. I have a project which uses webpack, datatables, fomantic-ui. The old webpack kind off compiles everything and that's not the case with vite. everything has to be exported and old vendor js libraries can't (or I can't)

Ответить
Ahsan Rasheed
Ahsan Rasheed - 09.06.2023 14:05

Install latest Laravel and migrate the old version code into the latest Laravel is the best approach.
Thanks Mr. Povilas Korop

Ответить
Karen M
Karen M - 23.05.2023 15:57

Thank you SOOOOO much for this video and for Laravel Shift! OMG. You've made my week. Month. Maybe even year! I had three 5.7 projects that needed upgrading, and I managed to manually get them all up to Laravel v8 without toooooo much trouble. But that step from v8 to v9 was a big one and it gave me fits. Then I found this video and did a double-take on Laravel Shift. What is that? I asked. Went to the website and did a V-8 headslap. For a few bucks, Shift did my (first) upgrade from Laravel 8 to 9, leaving me with only a few minor clean-up tasks, and my app is working like a charm!! Guess who's Shifting the other two apps! :D I feel like a walking commercial for Laravel Shift. :P

Ответить
Artan Emini
Artan Emini - 25.04.2023 18:55

Pita 😭

Ответить
Daniel Spindler
Daniel Spindler - 13.03.2023 11:33

sadly upgrading laravel is always such a hassle. doesnt seem like it wants to be upgraded

Ответить
Michael Pritchard
Michael Pritchard - 12.03.2023 16:01

I have used Rector PHP to upgrade code from PHP 7 to PHP 8 the noticible difference being the constructor property promotion. This make the code 'feel' modern. There are plugins for Laravel, which I haven't tried. I have used the PHP 8.0 rule (which includes ClassPropertyAssignToConstructorPromotionRector), which worked will with code that had either doc blocks or types already specified.

Ответить
Julio Rodriguez
Julio Rodriguez - 10.03.2023 02:45

I had a situation where my only option was to fork the original project. Then i was able to implement bug fixes and later on support for Laravel 9, then L10. jcrodriguezt/laravel-sybase

Ответить
JoeChan
JoeChan - 09.03.2023 12:03

Some people think that if you are in a project that is too old (like technical debt), you should get out of the project.
By any chance, it’s kinda waste of time.

Ответить
MrAivaonair
MrAivaonair - 08.03.2023 12:52

Since I have many projects 100+, my strategy is to constantly upgrade all projects to second to newest version. When Laravel 10 is released I upgrade all Laravel 8 projects to Laravel 9 version and so on. For new projects I of course choose the newest Laravel version. Having all routes covered with tests gives you peace of mind, because you don`t have to guess what is working and whats not after upgrade.For very old projects of best strategy is install newest Laravel version and to move code Module by Module. Another recommendation is to run composer update when you open a project after a while and sudo apt-get upgrade if you run running your apps in linux, since in my company security vulnerability mitigation is high priority activity. Happy coding!

Ответить
Augusto Mora
Augusto Mora - 07.03.2023 02:48

Hi Povilas, thanks for the video.
I use VS Code connected to GitHub and the repository connected to the live production server.
Should I create a new branch to work on the updating process or how would you do it in a case like this? Thanks in advance for your help.

Ответить
Andris Briedis
Andris Briedis - 06.03.2023 12:16

Question. Exactly Laravel. How important is it to consider LTS versions? How many things are different between LTS and regular version?
The latest LTS I see is version 6. It's already way too old.

Ответить
andy wong
andy wong - 06.03.2023 05:03

lets say you have a project from a client that was using laravel version 7 and you opted to recreate the whole project using laravel 10, do you charge the client for that?

Ответить
De Vito Solucoes
De Vito Solucoes - 06.03.2023 04:33

Hi, how are you? Any ideas where I can find laravel jobs online? mid level (5ys). Ty

Ответить
Patrice Roy
Patrice Roy - 06.03.2023 03:14

Went from 5.4 to 10 in my company. Also migrated it from an IIS server to Nginx.

All in all the transition took several months. But I went through it.

Ответить
Raymy Tech
Raymy Tech - 05.03.2023 22:36

Codecanyon projects have 'core' folder which 'app' folder and other folders are inside, how do they create those projects?

Ответить
Raymy Tech
Raymy Tech - 05.03.2023 22:26

I'm coming from laravel 5.6

Ответить
Salman Khan777
Salman Khan777 - 05.03.2023 22:25

Hy , sir can u please add a vedio of how to update lower version of laravel and php with its dependencies

Ответить
Lorenzo Lorini Kalil
Lorenzo Lorini Kalil - 05.03.2023 17:27

I recently updated a project from 5.5 to 9, almost a month to complete te update and many sleepless nights, i considered laravel shift but the prices were crazy, almost 200 dollars for the whole project

Ответить
Mohammad Imran Mir
Mohammad Imran Mir - 05.03.2023 17:20

I have a very separate question.
We use accessors in model to modify our results.
But in some cases we don't want so..
E.g if we append a field xyz using accessors and we can get our desired result but in any other place or in any other function we don't want that xyz, what you think in that case we should do

Ответить
Gilney N. Mathias
Gilney N. Mathias - 05.03.2023 16:30

Where i work on we are still using 5.5 😅

Ответить
David
David - 05.03.2023 15:56

Here is the power of "GIT REBASE".. This is why i use allways git rebase for all my projects, with one click.

Ответить
Valentin Valev
Valentin Valev - 05.03.2023 14:03

Rule #1 - if it works - don't touch it

Ответить
Shakil ahmed
Shakil ahmed - 05.03.2023 13:55

yeah true recently i was trying to upgrade an old project from v8 to v10 and found out that 2 of the packages were dead and for that reason couden't upgrade the project : (

Ответить
Mohammad Ashrafuddin Ferdousi
Mohammad Ashrafuddin Ferdousi - 05.03.2023 13:35

In laravel 10 and docker implementation, I found monolog related issue that the Logger class is not found and the method signatur does not match and is not comparible. Though it is not the exact message but does anyone getting such error for monolog and collision package?

Ответить
Gameplay By Faks
Gameplay By Faks - 05.03.2023 12:42

rather, easy to do upgrade create draft laravel 10, and copy everything to new project and do the fixes rather easy...

Ответить
Programming Mindset
Programming Mindset - 05.03.2023 12:01

The best method is
1. install a empty laravel 10 project and copy composer.json file
2. make a backup of your old composer.json of old project
3. replace your existing composer.json with new laravel 10's composer.json
4. update your cmd/terminal php 8.1
5. finally its time to run : composer update
6. after that, fixed some error if arises
😎😎😎😎

Ответить
Vishal Chavda
Vishal Chavda - 05.03.2023 11:56

Thank you Povilas for all the suggestions. I have been working on a project with an older laravel version and want to upgrade it so in my opinion re-creating the project from scratch is the best option.

Ответить
William Gérald Blondel
William Gérald Blondel - 05.03.2023 11:03

I recently upgraded my company's product (250k+ lines of code) from Laravel 5.7 to Laravel 9, this is how I did it:
1. Upgrade the dependencies that can be upgraded without upgrading Laravel, and replace abandoned dependencies. This took a while, for example the libraries we used to deal with PDF and generate charts completely changed their structure from one major version to another, so we had to rewrite a lot of stuff.
2. Upgrade to Laravel 5.8, bump dependencies to versions that support 5.8
3. Upgrade to Laravel 6, bump dependencies to versions that support 6
4. and so on and so on, until Laravel 9

For each step, we of course had to rewrite some functions because of dependencies' breaking changes

Ответить
Ali Raza
Ali Raza - 05.03.2023 10:39

Upgraded mine from 5.8.x to 10.x in around 1 hour, simply make an empty laravel project and then convert the routes, and move the models and some little stuff. It works!

Ответить
Muntaser Muttaqi
Muntaser Muttaqi - 05.03.2023 10:30

For older versions prior to version 7 or 6, I would perform a fresh installation of Laravel 10. Then, I would gather all the code from the previous projects and manually install all the necessary packages. Finally, I would ensure that everything is functioning properly by conducting thorough testing, as I would during a standard upgrade.

Ответить
Kreaweb BE
Kreaweb BE - 05.03.2023 10:07

Bumping up the Laravel version in your projects gives you and your customer another big advantage. This way you can also step up the used PHP version, giving the application a free and noticable power and speed boost. I mostly use Laravel Shift to make version bumps. Bringing the production servers up to PHP 8 means adding a lot of free computing power to the applications.

Ответить
Godson Mandla
Godson Mandla - 05.03.2023 09:42

Love your videos men. I get to learn new things every single day. God bless you

Ответить
Safwan Abdulghani
Safwan Abdulghani - 05.03.2023 09:31

What do you think about pinia ORM?

Ответить
Luis Alberto Oliveira
Luis Alberto Oliveira - 05.03.2023 09:25

I'm working on a project that was using laravel 6... it was possible to bring it to 8.75, and I'll deliver as is because of the deadline but I realized that it's better to recreate the project! So throughout the journey, I put in a roadmap of all the functions, routes, and controllers... to make it a little bit easier to achieve a good result when I start to do that.

Ответить
Karim Tarek
Karim Tarek - 05.03.2023 09:19

Hi povilas,
I have a question
I have a php extension file have abstract class and some class all in same file
I wanna use it in laravel project
i tried to include the file in my controller, alao tried to use namespace for the file and i couldn't
Help me please how can i use this file

Ответить
ANDRIAMASY Eric Mathieu
ANDRIAMASY Eric Mathieu - 05.03.2023 09:01

Super

Ответить