File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66
77## [ Unreleased]
88
9+ ## [ 8.1.0] - 2022-03-13
10+ ### Removed
11+ - Method ` getAvailableBalance ` .
12+
13+ ### Added
14+ - Methods ` withItems ` , ` withItem ` , ` withMeta ` on Cart-object.
15+
16+ ### Deprecated
17+ - Method ` addItems ` , ` addItem ` , ` setMeta ` on Cart-Object.
18+
919## [ 8.0.6] - 2022-02-26
1020### Updated
1121- Replaced an object with an interface (Events) #444 @ysfkaya
@@ -801,7 +811,8 @@ The operation is now executed in the transaction and updates the new `refund` fi
801811- Exceptions: AmountInvalid, BalanceIsEmpty.
802812- Models: Transfer, Transaction.
803813
804- [ Unreleased ] : https://github.com/bavix/laravel-wallet/compare/8.0.6...develop
814+ [ Unreleased ] : https://github.com/bavix/laravel-wallet/compare/8.1.0...develop
815+ [ 8.0.6 ] : https://github.com/bavix/laravel-wallet/compare/8.0.6...8.1.0
805816[ 8.0.6 ] : https://github.com/bavix/laravel-wallet/compare/8.0.5...8.0.6
806817[ 8.0.5 ] : https://github.com/bavix/laravel-wallet/compare/8.0.4...8.0.5
807818[ 8.0.4 ] : https://github.com/bavix/laravel-wallet/compare/8.0.3...8.0.4
Original file line number Diff line number Diff line change @@ -194,3 +194,33 @@ On a basket of 150 products, the acceleration is a whopping 24x.
194194All changes can be found in the [ pull request] ( https://github.com/bavix/laravel-wallet/pull/407/files ) .
195195The kernel has changed globally, I would not recommend switching to version 7.0.0 at the very beginning, there may be bugs.
196196I advise you should at least 7.0.1.
197+
198+ ## 7.x.x → 8.0.x
199+
200+ Nothing needs to be done.
201+
202+ ## 8.0.x → 8.1.x
203+
204+ Replace ` getAvailableBalance ` to ` getAvailableBalanceAttribute ` (method) or ` available_balance ` (property).
205+
206+ ---
207+
208+ Cart methods now support fluent-dto. It is necessary to replace the old code with a new one, for example:
209+
210+ ``` php
211+ // old
212+ $cart = app(\Bavix\Wallet\Objects\Cart::class)
213+ ->addItems($products)
214+ ->addItem($product)
215+ ->setMeta(['hello' => 'world']);
216+
217+ $cart->addItem($product);
218+
219+ // new. fluent
220+ $cart = app(\Bavix\Wallet\Objects\Cart::class)
221+ ->withItems($products)
222+ ->withItem($product)
223+ ->withMeta(['hello' => 'world']);
224+
225+ $cart = $cart->withItem($product);
226+ ```
You can’t perform that action at this time.
0 commit comments