Skip to content

Commit

Permalink
The Checkout interface extends ArrayAccess and Shippable
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Mar 30, 2024
1 parent bb272b1 commit 5f2769b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
- Added the `Address` DTO class (implements the `Address` interface)
- Added the `AdjusterAliases` class that for decoupling FQCNs from the database
- Added automatic mapping of adjuster FQCN <-> aliases when saving an adjustment into the DB and when calling the `getAdjuster()` method
- BC: The `Checkout` interface now extends the `ArrayAccess` and the `Shippable` interfaces (until here, only the concrete classes have implementation it)
- BC: Added cart and order item models to the Relation morph map: the `adjustable_type` field in the `adjustments` table needs to be converted!
- BC: Added the `?CheckoutSubject` return type to the `getCart()` method of the `Checkout` interface
- BC: Changed `Checkout::getShippingAddress()` return type to be nullable
Expand Down
1 change: 1 addition & 0 deletions src/Checkout/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Changed minimum Laravel version to v10.38.2
- Changed minimal Enum requirement to v4.2
- Added the `BillpayerChanged` event
- BC: The `Checkout` interface now extends the `ArrayAccess` and the `Shippable` interfaces (until here, only the concrete classes have implementation it)
- BC: Added the `?CheckoutSubject` return type to the `getCart()` method of the `Checkout` interface
- BC: The unused `$config` parameter has been removed from the `RequestStore` checkout driver constructor
- BC: Changed `Checkout::getShippingAddress()` return type to be nullable
Expand Down
5 changes: 1 addition & 4 deletions src/Checkout/CheckoutManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@
use Vanilo\Contracts\CheckoutSubject;
use Vanilo\Contracts\DetailedAmount;
use Vanilo\Contracts\Dimension;
use Vanilo\Contracts\Shippable;

/** @todo Remove `ArrayAccess` and make the Checkout interface to extend ArrayAccess in v4 */
/** @todo Remove `Shippable` and make the Checkout interface to extend Shippable in v4 */
class CheckoutManager implements CheckoutContract, Shippable, \ArrayAccess
class CheckoutManager implements CheckoutContract
{
use ForwardsCalls;

Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/Contracts/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@

namespace Vanilo\Checkout\Contracts;

use ArrayAccess;
use Vanilo\Contracts\Address;
use Vanilo\Contracts\Billpayer;
use Vanilo\Contracts\CheckoutSubject;
use Vanilo\Contracts\DetailedAmount;
use Vanilo\Contracts\Shippable;

interface Checkout
interface Checkout extends Shippable, ArrayAccess
{
public function getCart(): ?CheckoutSubject;

Expand Down

0 comments on commit 5f2769b

Please sign in to comment.