gnikyt / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
1.24k stars 374 forks source link

Upgrade help #486

Closed yrk2yrk closed 4 years ago

yrk2yrk commented 4 years ago

Has anyone able to upgrade to v11 from v10x while retaining the 'ShopifyApp::shop()' and custom authentication? We have several users on pre v11 app so we are trying to upgrade to latest version while trying to retain the old structure but getting many errors.

Please help.

Kyon147 commented 4 years ago

You won't be able to keep the ShopifyApp::shop as the ShopifyApp class has been removed in favour of the user authentication. Now you access stuff through Auth::user which is native to Laravel.

You will need to migrate to that to be able to use v11. There is an upgrade guide in the wiki which walks you through it. https://github.com/osiset/laravel-shopify/wiki/Upgrade-guide-v10.x-to--v11.x

yrk2yrk commented 4 years ago

Thanks @Kyon147, I had done many customization to existing app based on older class. I have been trying to upgrade using above guide but there are so many errors, plus I need to change the db structure which is lot of work. So was hoping if someone managed to do it by retaining older structure.

Kyon147 commented 4 years ago

Thanks @Kyon147, I had done many customizations to existing app based on older class. I have been trying to upgrade using above guide but there are so many errors, plus I need to change the db structure which is lot of work. So was hoping if someone managed to do it by retaining older structure.

Unfortunately not, osiset has spent a considerable amount of time rewriting everything about the package. It has a much more SOLID principle build and it a lot more robust to keep everything as agnostic as possible.

Plus it has been rebuilt to use Laravel's default Authentication which makes it a lot easier to extend, for example when using Websockets and Laravel Echo. If you've customised a lot of the previous app base then that will make it more complicated when looking to upgrade as it's become more bespoke to you.

If you really want to upgrade to v11, you will just have to work through each error as you get to one and the DB changed aren't too bad if you just work through the upgrade guide for that part.

yrk2yrk commented 4 years ago

After upgrading I am not able to use custom routes. I defined custom routes in the web.php as per per the documentation but after authentication the app still goes to default home page. Is there anything I am missing here?