From 7084d6835e8e0608cd9b3a5eb6e2476bf5f5ea2e Mon Sep 17 00:00:00 2001 From: MannikJ Date: Tue, 26 May 2020 16:41:57 +0200 Subject: [PATCH] Upgrade Dependency to Laravel v7 --- composer.json | 8 ++++---- src/Observers/TransactionObserver.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 1c45abc..3b905da 100644 --- a/composer.json +++ b/composer.json @@ -27,14 +27,14 @@ } ], "require": { - "php": "^7.2", - "laravel/framework": "^6.0" + "php": "^7.2.5", + "illuminate/support": "^7.0" }, "require-dev": { "doctrine/dbal": "^2.9", "mockery/mockery": "^1.1", - "orchestra/testbench": "^4.0", - "phpunit/phpunit": "^8.0" + "orchestra/testbench": "^5.0", + "phpunit/phpunit": "^9.0" }, "autoload": { "psr-4": { diff --git a/src/Observers/TransactionObserver.php b/src/Observers/TransactionObserver.php index ac06fb1..df3cb48 100644 --- a/src/Observers/TransactionObserver.php +++ b/src/Observers/TransactionObserver.php @@ -18,7 +18,7 @@ public function created($transaction) public function updated($transaction) { - $oldAmountWithSign = $transaction->getAmountWithSign($transaction->getOriginal('amount'), $transaction->getOriginal('type')); + $oldAmountWithSign = $transaction->getAmountWithSign($transaction->getRawOriginal('amount'), $transaction->getRawOriginal('type')); if ($oldAmountWithSign != $transaction->amount) { // revert old balance $transaction->wallet->balance -= $oldAmountWithSign; @@ -34,4 +34,4 @@ public function deleted($transaction) $transaction->wallet->balance -= $transaction->amount; $transaction->wallet->save(); } -} \ No newline at end of file +}