Комментарии:
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
Ответить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)
ОтветитьInstall latest Laravel and migrate the old version code into the latest Laravel is the best approach.
Thanks Mr. Povilas Korop
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
ОтветитьPita 😭
Ответитьsadly upgrading laravel is always such a hassle. doesnt seem like it wants to be upgraded
Ответить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.
Ответить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
Ответить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.
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!
Ответить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.
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.
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?
ОтветитьHi, how are you? Any ideas where I can find laravel jobs online? mid level (5ys). Ty
Ответить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.
Codecanyon projects have 'core' folder which 'app' folder and other folders are inside, how do they create those projects?
ОтветитьI'm coming from laravel 5.6
ОтветитьHy , sir can u please add a vedio of how to update lower version of laravel and php with its dependencies
Ответить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
Ответить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
Where i work on we are still using 5.5 😅
ОтветитьHere is the power of "GIT REBASE".. This is why i use allways git rebase for all my projects, with one click.
ОтветитьRule #1 - if it works - don't touch it
Ответить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 : (
Ответить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?
Ответитьrather, easy to do upgrade create draft laravel 10, and copy everything to new project and do the fixes rather easy...
Ответить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
😎😎😎😎
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.
Ответить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
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!
Ответить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.
Ответить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.
ОтветитьLove your videos men. I get to learn new things every single day. God bless you
ОтветитьWhat do you think about pinia ORM?
Ответить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.
Ответить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
Super
Ответить