concretecms-community-store / community_store

An open, free and community developed eCommerce system for Concrete CMS
https://concretecms-community-store.github.io/community_store/
MIT License
106 stars 66 forks source link

Use $app->make() to create payment method controller instances #766

Closed mlocati closed 1 year ago

mlocati commented 1 year ago

What about using $app->make() instead of new to create instances of the controllers of payment methods?

That way, we could use dependency injection to initialize the controllers...

Mesuva commented 1 year ago

Totally, there's going to be a huge number of aspects to this add-on that could be updated and improved. Some work was done in a version 3 branch for example, to fix a lot of legacy stuff from the installer. I'd like to merge some of that in at some point, add some better cart functions, clean a large amount up over time. (my challenge is just how busy I am!)

mlocati commented 1 year ago

I totally agree! A lot of old and strange stuff (for example, the fact that payment method controllers extend payment method entities) should be fixed. And I also absolutely understand (and share) the same lack of spare time 😉