duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/addons/duncanmcclean/simple-commerce
Other
146 stars 40 forks source link

[6.x] Query Builders #973

Closed duncanmcclean closed 8 months ago

duncanmcclean commented 8 months ago

This pull request implements query builders for products, orders & customers.

This means we can use the same query across multiple repositories which was previously not possible as you had to implement the same-ish query two/three times depending on the repository in use.

The query builders extend the EntryQueryBuilder and EloquentQueryBuilder that are built into Statamic.

This PR shouldn't make much of a difference to end-developers, apart from the fact Product::all()/Customer::all()/Order::all() will now return Simple Commerce objects, rather than entries/Eloquent models.

This PR also improves the state of testing around the various product/order/customer repositories.

To Do

github-actions[bot] commented 7 months ago

Released as part of v6.0.0.