Sylius / ShopApiPlugin

Shop API for Sylius.
https://sylius.com
129 stars 89 forks source link

Availability product variant #701

Closed mamazu closed 3 years ago

mamazu commented 3 years ago

Replaces #648

lchrusciel commented 3 years ago

Thanks, @mamazu! :tada:

mamazu commented 3 years ago

The idea behind this was that it was optional to add this feature. I wasn't sure it it would be a BC break to do so.

diimpp commented 3 years ago

Missing DI definition with actual service injection. I think this is not a BC, it's a part of standard sylius behavior and only expected to function this way. There are too many things broken in shop-api and if we're to treat each improvement to normality as BC -- nothing ever would be done :)

We should check for enabled/disabled over here as well.

Maybe we can introduce a point of extension over here, ShopApi AvailabiltyCheckerInterface with CompositeAvailabilityChecker, which will check for Inventory availability, enabled/disabled and as extension point, a common use case for my projects -- archived products/variants.

Sounds good? I already have such system in place for my project, I can do follow-up PR.