Skip to content

Commit

Permalink
Add support for php 8.1 & Laravel 9
Browse files Browse the repository at this point in the history
  • Loading branch information
bomshteyn authored Sep 13, 2022
1 parent 44cd3af commit 87c1131
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `shopping-cart` will be documented in this file.

## 1.5 - 2022-09-13

- add support for php 8.1 & Laravel 9

## 1.4.3 - 2021-02-18

- Update config file: keep the default values, but look for env variables if available.
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
}
],
"require": {
"php": "^7.3|^8.0",
"php": "^7.3|^8.0|^8.1",
"ext-json": "*",
"illuminate/config": "^6.0|^7.0|^8.0",
"illuminate/database": "^6.20.12|^7.30.4|^8.22.1",
"illuminate/support": "^6.0|^7.0|^8.0"
"illuminate/config": "^6.0|^7.0|^8.0|^9.0",
"illuminate/database": "^6.20.12|^7.30.4|^8.22.1|^9.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0"
},
"require-dev": {
"orchestra/testbench": "^4.0|^5.0|^6.0",
Expand Down
2 changes: 2 additions & 0 deletions src/BuyableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function getBuyableIdentifier()
* Get the description or title of the Buyable item.
*
* @return string
*
* @throws \Exception
*/
public function getBuyableDescription()
Expand All @@ -31,6 +32,7 @@ public function getBuyableDescription()
* Get the price of the Buyable item.
*
* @return float|null
*
* @throws \Exception
*/
public function getBuyablePrice()
Expand Down
3 changes: 3 additions & 0 deletions src/Concerns/ManagesCartItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function add(Buyable $buyable, int $quantity = 1, array $options = []): s
* @param int $item
* @param int $quantity
* @return \Treestoneit\ShoppingCart\CartManager
*
* @throws \Exception
*/
public function update(int $item, int $quantity): self
Expand All @@ -87,6 +88,7 @@ public function update(int $item, int $quantity): self
* @param int $item
* @param int $quantity
* @return \Treestoneit\ShoppingCart\CartManager
*
* @throws \Exception
*/
public function updateQuantity(int $item, int $quantity): self
Expand Down Expand Up @@ -136,6 +138,7 @@ public function updateOption(int $item, string $option, $value): self
*
* @param int $item
* @return static
*
* @throws \Exception
*/
public function remove(int $item): self
Expand Down
1 change: 1 addition & 0 deletions src/Models/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Treestoneit\ShoppingCart\Models\CartItemCollection|\Treestoneit\ShoppingCart\Models\CartItem[] $items
* @property-read int|null $items_count
*
* @method static \Illuminate\Database\Eloquent\Builder|\Treestoneit\ShoppingCart\Models\Cart newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\Treestoneit\ShoppingCart\Models\Cart newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\Treestoneit\ShoppingCart\Models\Cart query()
Expand Down
1 change: 1 addition & 0 deletions src/Models/CartItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* @property-read float $subtotal
* @property-read float $total
* @property-read string $identifier
*
* @method static \Illuminate\Database\Eloquent\Builder|\Treestoneit\ShoppingCart\Models\CartItem newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\Treestoneit\ShoppingCart\Models\CartItem newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\Treestoneit\ShoppingCart\Models\CartItem query()
Expand Down

0 comments on commit 87c1131

Please sign in to comment.