AsgardCms / Platform

A modular multilingual CMS built with Laravel 5.
https://asgardcms.com/
MIT License
781 stars 241 forks source link

Upgrade to Laravel 6 #721

Closed mikemand closed 4 years ago

mikemand commented 5 years ago

This is more of a checklist for me than anything, but anyone can contribute if I missed something.

https://laravel.com/docs/6.0/upgrade

Used packages:

For laravel-translatable, here's an "upgrade guide": https://docs.astrotomic.info/laravel-translatable/changelog#v-11-0-0

For me for later: https://twitter.com/stefanbauerme/status/1170092375894626304

Replace unmaintained Predis with PhpRedis: https://github.com/phpredis/phpredis/blob/develop/INSTALL.markdown Predis has been revived.

dakshhmehta commented 4 years ago

How can I contribute to this? Please do provide guideline on starting or assign me a task to work on. We are using Asgard on many of our production websites and ERP solutions we develop, my team of 3 developers happy to contribute here for benefits of community!

abdallhsamy commented 4 years ago

Could I help you to upgrade to laravel 7 latest version or at least 6 LTS version?

dakshhmehta commented 4 years ago

Hello,

We will be happy to help. How so we start? Shall we work on a new branch from master?

On Mon, 9 Mar 2020, 01:53 Abdallah Samy, notifications@github.com wrote:

Could I help you to upgrade to laravel 7 latest version or at least 6 LTS version?

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AsgardCms/Platform/issues/721?email_source=notifications&email_token=AAOAXQJVYRWNMVYJD4ILPQTRGP5FXA5CNFSM4IUDSLF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOFANTA#issuecomment-596248268, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQO2QZ53GXFXNCXF6PTRGP5FXANCNFSM4IUDSLFQ .

ChristianGiupponi commented 4 years ago

any news?

dakshhmehta commented 4 years ago

Nope. Was working on one of the deadline we are about to start a new project in next, at that time will be able to give an update.

On Sat, 14 Mar 2020, 14:34 Christian Giupponi, notifications@github.com wrote:

any news?

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AsgardCms/Platform/issues/721#issuecomment-599030848, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQMHWCB6MPUGC6EXKGLRHNCBRANCNFSM4IUDSLFQ .

imagina commented 4 years ago

Any news about it, we could help too. @nWidart ?

nWidart commented 4 years ago

Hello,

Thank you for all your comments πŸ™ What information is missing?

@mikemand what's the status of this PR?

mikemand commented 4 years ago

Hi @nWidart,

I have not had a chance to even get started. So if people want to start picking modules to update that would be great.

Laravel 6 and 7 are pretty much interchangeable (just double-check the upgrade guide in the Laravel Docs), so we should be able to be compatible with both.

abdallhsamy commented 4 years ago

How can I contribute to this? Please do provide guideline on starting or assign me a task to work on. We are using Asgard on many of our production websites and ERP solutions we develop, my team of 3 developers happy to contribute here for benefits of community! @dakshhmehta https://asgardcms.com/docs/v3/getting-started/contributing

dakshhmehta commented 4 years ago

I will be picking up the few modules for the next week, shall update next Saturday.

Targetting:

  1. Core
  2. User
abdallhsamy commented 4 years ago

I will be picking up the few modules for the next week, shall update next Saturday.

Targetting:

  1. Core
  2. User

I guess you should upgrade packages first @dakshhmehta

dakshhmehta commented 4 years ago

Do you mean the composer dependencies?

On Sun, Apr 12, 2020 at 12:32 PM Abdallah Samy notifications@github.com wrote:

I will be picking up the few modules for the next week, shall update next Saturday.

Targetting:

  1. Core
  2. User

I guess you should upgrade packages first @dakshhmehta https://github.com/dakshhmehta

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AsgardCms/Platform/issues/721#issuecomment-612573679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQPZLHCJ5RYC23FIXDDRMFRPRANCNFSM4IUDSLFQ .

-- Best Regards, Daksh Mehta http://dakshhmehta.com daksh@dristal.com +91-9545438367 Skype: dakshhmehta

abdallhsamy commented 4 years ago

Do you mean the composer dependencies? @dakshhmehta yes

arturmamedov commented 4 years ago

@dakshhmehta are you yet working on? Why not speaking about this on AsgardCMS Slack Chat http://slack.asgardcms.com/

mkmita commented 4 years ago

Is this project dead?

dakshhmehta commented 4 years ago

No. Upgrade is bit slow. I'm on it during the weekends. I personally myself using it in multiple production apps and never gonna let it die...

On Thu, 2 Jul 2020, 23:00 Mindaugas, notifications@github.com wrote:

Is this project dead?

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AsgardCms/Platform/issues/721#issuecomment-653134477, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQJMTEVO2X47B7KAJZTRZS747ANCNFSM4IUDSLFQ .

mkmita commented 4 years ago

I see latest one is 7.6 now https://github.com/laravel/laravel/blob/master/CHANGELOG.md

Do we plan to catch up on this?

Maybe you need any help and it would be possible to scale on this?

imagina commented 4 years ago

No. Upgrade is bit slow. I'm on it during the weekends. I personally myself using it in multiple production apps and never gonna let it die... … On Thu, 2 Jul 2020, 23:00 Mindaugas, @.***> wrote: Is this project dead? β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#721 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQJMTEVO2X47B7KAJZTRZS747ANCNFSM4IUDSLFQ .

Is there a repo? we would like to help. We need to upgrade to Laravel 7 and we don't want to leave asgard behind but seems to be the way to go if we can't move forward...

Actually the only thing we use is nWidart/laravel-modules and the "Core" module (users, permissions) but we have our own admin interface in "Quasar Framework": https://github.com/quasarframework/quasar

abdallhsamy commented 4 years ago

@nWidart is this project dead ? I want to contribute to upgrade to latest Laravel 8 LTS

dakshhmehta commented 4 years ago

No, can you check 5.8 is working good for you, we do have a merge request awaiting...

On Tue, Oct 6, 2020 at 12:45 AM Abdallah Samy notifications@github.com wrote:

@nWidart https://github.com/nWidart is this project dead ? I want to contribute to upgrade to latest Laravel 8 LTS

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AsgardCms/Platform/issues/721#issuecomment-703834344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQIU4IQJCIWK6EEPOF3SJILNZANCNFSM4IUDSLFQ .

-- Best Regards, Daksh Mehta http://dakshhmehta.com daksh@dristal.com +91-9545438367 Skype: dakshhmehta

nWidart commented 4 years ago

@abdallhsamy No, you can still contribute.

joaonzangoII commented 4 years ago

How far are we on this?

Managed to have Asgard work with Laravel 7 making some changes I guess we need to start updating the packages.

dakshhmehta commented 4 years ago

Do share your repository. I want to give it a try. Also, few packages have been updated in 5.8 upgrade branch too but tests are failing, it does not break the Asgard but somehow tests are only failing so need some assistance with phpunit as I am not good with it....

On Mon, Oct 12, 2020 at 2:50 AM Joao Nzango II notifications@github.com wrote:

How far are we on this?

Managed to have Asgard work with Laravel 7 making some changes I guess we need to start updating the packages.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AsgardCms/Platform/issues/721#issuecomment-706769820, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQKQFCJSRHRGWK5FY5LSKIOQNANCNFSM4IUDSLFQ .

-- Best Regards, Daksh Mehta http://dakshhmehta.com daksh@dristal.com +91-9545438367 Skype: dakshhmehta

imagina commented 4 years ago

Anyone tried https://laravelshift.com ? seems like a solid option to update faster. What do you think?

dakshhmehta commented 4 years ago

Haven't tried but does it support all the composer packages? Many packages are not even maintained for newer version, so I doubt.

On Sat, Oct 24, 2020 at 10:47 AM Imagina Colombia notifications@github.com wrote:

Anyone tried https://laravelshift.com ? seems like a solid option to update faster. What do you think?

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AsgardCms/Platform/issues/721#issuecomment-715711660, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQP4XZY4N2ZWYQTGKXDSMJPNZANCNFSM4IUDSLFQ .

-- Best Regards, Daksh Mehta http://dakshhmehta.com daksh@dristal.com +91-9545438367 Skype: dakshhmehta

dakshhmehta commented 4 years ago

@joaonzangoII - I checked your profile but haven't got the repository. Can you share it with community if you manage to work on laravel 7, as I was still doing on 5.7 to 5.8, but if you got laravel 7 working, i guess, I should stop working on my branch and help you as you are ahead of me...

Thanks, Daksh

joaonzangoII commented 4 years ago

@dakshhmehta I am still separating the logic from what is needed on the core models and what was the implementation for my Project, as soon as I am done I will let everyone know!

jasonmccreary commented 4 years ago

Appreciate the shoutout for Shift. While I am not personally familiar with AsgardCMS, it appears to be a Laravel application. As such, you could absolutely use Shift to upgrade it efficiently.

However, as others have commented, the additional package dependencies may have their own upgrade steps. You'll also need to configure Shift to look at the additional paths for the Laravel Modules.

With all that said, given the current state and number of dependencies of AsgardCMS, if I were using this, I'd probably look to replace it with Nova or some other, modern open-source CMS. No disrespect. Just my honest opinion.

if someone does embark on upgrading this, I'm willing to run the Shifts to do so free of charge. Just email support.

dakshhmehta commented 4 years ago

Hello,

that would be great help Jason. I will prepare the dependency tree somehow and see what are incompatible packages that we may suffer as unmaintained/not tagged properly in revision.

Update you by Tuesday.

Regards, Daksh

On Thu, Oct 29, 2020 at 4:08 AM Jason McCreary notifications@github.com wrote:

Appreciate the shoutout for Shift https://laravelshift.com. While I am not personally familiar with AsgardCMS, it appears to be a Laravel application. As such, you could absolutely use Shift to upgrade it efficiently.

However, as others have commented, the additional package dependencies may have their own upgrade steps. You'll also need to configure Shift https://laravelshift.com/shiftrc-configuration-file to look at the additional paths for the Laravel Modules.

With all that said, given the current state and number of dependencies of AsgardCMS, if I were using this, I'd probably look to replace it with Nova or some other, modern open-source CMS. No disrespect. Just my honest opinion.

if someone does embark on upgrading this, I'm willing to run the Shifts to do so free of charge. Just email support.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AsgardCms/Platform/issues/721#issuecomment-718248602, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQIMNS3UZAVHNN362YLSNCMOHANCNFSM4IUDSLFQ .

-- Best Regards, Daksh Mehta http://dakshhmehta.com daksh@dristal.com +91-9545438367 Skype: dakshhmehta

imagina commented 4 years ago

Thanks to @jasonmccreary I have an almost ready version of 5.8 after 2-3 hours of work. I'll be sending the PR later.

I'm in the mood to update to Laravel 8. Let's go!

dakshhmehta commented 4 years ago

Im ready to contibute.

On Mon, Nov 2, 2020 at 8:01 AM Imagina Colombia notifications@github.com wrote:

Thanks to @jasonmccreary https://github.com/jasonmccreary I have an almost ready version of 5.8 after 2-3 hours of work. I'll be sending the PR later.

I'm in the mood to update to Laravel 8. Let's go!

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AsgardCms/Platform/issues/721#issuecomment-720203306, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQLQNOEUP46JN57JOY3SNYKYHANCNFSM4IUDSLFQ .

-- Best Regards, Daksh Mehta http://dakshhmehta.com daksh@dristal.com +91-9545438367 Skype: dakshhmehta

imagina commented 4 years ago

Thank you @dakshhmehta. I think we should wait until i have the update working at least for Laravel 7.x

The first PR is ready waiting review from @nWidart with the update to 5.8: https://github.com/AsgardCms/Platform/pull/791

I'm working in the update to 6.x. Thanks to @jasonmccreary I don't think it requires crazy work: The shift for 6.x is at: https://github.com/imagina/imaginacms-platform/pull/2

I sent a PR to floatingpoint/stylist so their package is compatible with Laravel 6.x, 7.x and 8.x: https://github.com/floatingpointsoftware/stylist/pull/50

If they don't answer in the next few days I have a fork ready so I can keep working with the update to 6.x

imagina commented 4 years ago

I have good news, laravel 6.x update was successful. Tests passing: https://github.com/imagina/imaginacms-platform/pull/3/checks?check_run_id=1349797683

I had to fork floatingpointsoftware/stylist

Now i'm movin on to Laravel 7.x

imagina commented 4 years ago

Shift to Laravel 7.x it's ready: https://github.com/imagina/imaginacms-platform/tree/shift-35887

But i have a block @nWidart

https://github.com/nWidart/laravel-menus is not yet compatible but seems like you have a PR in the repository to support 7.x https://github.com/nWidart/laravel-menus/pull/55/files

Do you have the chance to check it ?

Regards

dakshhmehta commented 4 years ago

OMG. This is great news. I will clone today and will see the test. @nWidart, awaiting for your revert, please!

Thank you!

On Wed, Nov 4, 2020 at 3:58 AM Imagina Colombia notifications@github.com wrote:

Shift to Laravel 7.x it's ready: https://github.com/imagina/imaginacms-platform/tree/shift-35887

But i have a block @nWidart https://github.com/nWidart

https://github.com/nWidart/laravel-menus is not yet compatible but seems like you have a PR in the repository to support 7.x https://github.com/nWidart/laravel-menus/pull/55/files

Do you have the chance to check it ?

Regards

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AsgardCms/Platform/issues/721#issuecomment-721407120, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQMGRJKVK4A6373QEQ3SOB7ZDANCNFSM4IUDSLFQ .

-- Best Regards, Daksh Mehta http://dakshhmehta.com daksh@dristal.com +91-9545438367 Skype: dakshhmehta

imagina commented 4 years ago

Ok, update to Laravel 7 is up and working:

All tests are passing:
image

And /backend is loading:

image

If anyone wants to help testing please clone this branch: https://github.com/imagina/imaginacms-platform/tree/shift-35887

And install with the command:
COMPOSER=composer.travis.json composer install

That way you avoid the current modules.

nWidart commented 4 years ago

Very good news!! πŸŽ‰

abdallhsamy commented 4 years ago

If anyone wants to help testing please clone this branch: https://github.com/imagina/imaginacms-platform/tree/shift-35887

And install with the command: COMPOSER=composer.travis.json composer install

That way you avoid the current modules.

@imagina I will

imagina commented 4 years ago

Hey everyone, the PR with the update to Laravel 7.29 is ready. I solved a couple of issues today.

Most of the admin area is tested in a new Asgard Install with PHP 7.2 with the current docker configuration and everything seems to be working.

Let me know if you find any issues.

https://github.com/AsgardCms/Platform/pull/792

abdallhsamy commented 4 years ago

image

imagina commented 4 years ago

Ok, i did the final update to Laravel 8. PR sent to @nWidart for review.

You can clone the following branch if you want to test: https://github.com/imagina/imaginacms-platform/tree/upstream-master-for-8.x

joaonzangoII commented 4 years ago

@imagina I guess there should also be a change in version for the modules @nWidart whats your take on this?

dakshhmehta commented 4 years ago

Laravel: 5.8.x Branch: master

@imagina - the Translation module driver seems to be wrong as attached in screenshot.

image

Adding following in config/cache.php fixed the issue

 'translations' => [
            'driver' => 'array',
        ],
imagina commented 4 years ago

Hello @dakshhmehta , please test with the branch https://github.com/imagina/imaginacms-platform/tree/upstream-master-for-8.x

That's the final update to Laravel 8. I fixed a couple of issues with config files in that branch.

abdallhsamy commented 4 years ago

I think we should replace astrotomic/laravel-translatable because it makes the response very slow

dakshhmehta commented 4 years ago

I see, what's the alternative?

On Tue, Nov 10, 2020 at 12:59 AM Abdallah Samy notifications@github.com wrote:

I think we should replace astrotomic/laravel-translatable because it makes the response very slow

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AsgardCms/Platform/issues/721#issuecomment-724228972, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQJTQKNP2XXJCJ3ID4TSPA7LNANCNFSM4IUDSLFQ .

-- Best Regards, Daksh Mehta http://dakshhmehta.com daksh@dristal.com +91-9545438367 Skype: dakshhmehta

abdallhsamy commented 4 years ago

I did not try spatie/laravel-translatable but I think I should be better because it does not add more tables in database and does not need to use more queries for foriegn keys

imagina commented 4 years ago

astrotomic/laravel-translatable use an additional join per table but the data is easily searchable. Spatie saves everything in a column like json. In a medium-big site with multiples languages, astrotomic is much faster.

By the way, you can use spatie/laravel-translatable in any of your Modules entities if you don't need to search/filter the translated data.

dakshhmehta commented 4 years ago

This is correct point. I also think using JSON is not efficient way of storiing the translations, I guess astrotomic package is better as it uses the inner join and does good job in searching and filtering...Also, I guess will work good with scout...

On Wed, Nov 11, 2020 at 10:28 PM Imagina Colombia notifications@github.com wrote:

astrotomic/laravel-translatable use an additional join per table but the data is easily searchable. Spatie saves everything in a column like json. In a medium-big site with multiples languages, astrotomic is much faster.

By the way, you can use spatie/laravel-translatable in any of your Modules entities if you don't need to search/filter the translated data.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AsgardCms/Platform/issues/721#issuecomment-725538722, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAXQNDTBVQL4DLWVQXBPLSPK7EBANCNFSM4IUDSLFQ .

-- Best Regards, Daksh Mehta http://dakshhmehta.com daksh@dristal.com +91-9545438367 Skype: dakshhmehta

mikemand commented 4 years ago

Platform v4 is working with Laravel 8 now (see PR #793). I am going to close this since we skipped right over Laravel 6.

To upgrade your existing v4 applications to the latest, I suggest using a diff program (personally I use Beyond Compare) to go through everything in the root as well as in the following directories:

You can either download/clone a copy of the current master branch from here or create a new Asgard v4 app to compare your existing one against.