chore: add test bootstrap, update phpunit config, and add Laravel 13 support to README

- Add tests/bootstrap.php to suppress PHP 8.4 vendor deprecation notices (Mockery implicit-nullable)
- Update phpunit.xml.dist to reference bootstrap, use PHPUnit 11.5 schema, and ignore indirect deprecations
- Note Laravel 13 support in README
This commit is contained in:
Joel Male
2026-05-27 19:50:09 +10:00
parent 05729b7865
commit aaa3360d1f
3 changed files with 25 additions and 14 deletions
+8 -7
View File
@@ -9,11 +9,12 @@
A Cart Implementation for Laravel.
Supported Laravel Versions: 10, 11, and 12.
Supported Laravel Versions: 10, 11, 12, and 13.
For Laravel 9.0 and below, please use version [1.0](https://github.com/wearepixel/laravel-cart/releases/tag/1.0.12)
## Table of Contents
- [Getting Started](#-getting-started)
- [Demo](#-deni)
- [Documentation](#-documentation)
@@ -27,6 +28,7 @@ ## Table of Contents
- [License](#-license)
## 🚀 Getting Started
### 🔥 Installing
Install the package through [Composer](http://getcomposer.org/).
@@ -107,7 +109,6 @@ #### Round Mode
'round_mode' => env('LARAVEL_CART_ROUND_MODE', 'down'),
```
### Basic Usage
The cart has a default sessionKey that holds the cart data and stores it in the session, so you can have multiple carts for multiple users.
@@ -168,8 +169,8 @@ #### Adding to the cart: **Cart::add()**
[], // attributes
[
[
'name' => '10% Off',
'type' => 'discount',
'name' => '10% Off',
'type' => 'discount',
'value' => '-10%'
]
] // conditions
@@ -199,7 +200,7 @@ #### Updating an item on a cart: **Cart::update()**
```php
Cart::update(
456, # product id
[
[
'name' => 'New Item Name', // new item name
'price' => 98.67, // new item price as a float or string
]
@@ -215,7 +216,7 @@ #### Updating an item on a cart: **Cart::update()**
// reducing it...
Cart::update(
456,
456,
[
'quantity' => -1, // so if from 4 to 3
]
@@ -841,4 +842,4 @@ ## 🫡 Credits
## 📓 License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.