Skip to content

Commit

Permalink
Merge pull request #128 from bavix/dependabot/composer/infection/infe…
Browse files Browse the repository at this point in the history
…ction-tw-0.15

Update infection/infection requirement from ^0.14 to ^0.15
  • Loading branch information
rez1dent3 authored Nov 30, 2019
2 parents e5fb0b9 + 20ca189 commit 68402f6
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ before_script:
- composer install

script:
- ./vendor/bin/phpunit --coverage-xml=build/coverage-xml --log-junit=build/phpunit.junit.xml
- ./vendor/bin/phpunit --coverage-xml=build/coverage-xml --log-junit=build/junit.xml
- ./vendor/bin/infection --coverage=build --min-msi=60 -j$(nproc)

after_success:
Expand Down
7 changes: 6 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [4.0.1] - 2019-11-30
### Fixed
- Encountered error: "You are not the owner of the wallet" #129 @arjayosma

## [4.0.0] - 2019-10-04
### Added
- Added interface `Storeable` for creating your own wallet balance repositories. #103
Expand Down Expand Up @@ -431,7 +435,8 @@ The operation is now executed in the transaction and updates the new `refund` fi
- Exceptions: AmountInvalid, BalanceIsEmpty.
- Models: Transfer, Transaction.

[Unreleased]: https://github.com/bavix/laravel-wallet/compare/4.0.0...HEAD
[Unreleased]: https://github.com/bavix/laravel-wallet/compare/4.0.1...HEAD
[4.0.1]: https://github.com/bavix/laravel-wallet/compare/4.0.0...4.0.1
[4.0.0]: https://github.com/bavix/laravel-wallet/compare/3.3.0...4.0.0
[3.3.0]: https://github.com/bavix/laravel-wallet/compare/3.2.1...3.3.0
[3.2.1]: https://github.com/bavix/laravel-wallet/compare/3.2.0...3.2.1
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"ramsey/uuid": "^3.0"
},
"require-dev": {
"infection/infection": "^0.14",
"orchestra/testbench": "^4.2",
"infection/infection": "^0.15",
"orchestra/testbench": "^4.4",
"phpstan/phpstan": "^0.11",
"phpunit/phpunit": "^8.4",
"laravel/cashier": "^7.0|^8.0|^9.0|^10.0"
Expand Down
1 change: 1 addition & 0 deletions src/Models/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Transaction extends Model
* @var array
*/
protected $casts = [
'wallet_id' => 'int',
'amount' => 'int',
'confirmed' => 'bool',
'meta' => 'json'
Expand Down
9 changes: 9 additions & 0 deletions src/Models/Transfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ class Transfer extends Model
'fee',
];

/**
* @var array
*/
protected $casts = [
'deposit_id' => 'int',
'withdraw_id' => 'int',
'fee' => 'int',
];

/**
* @return string
*/
Expand Down
1 change: 1 addition & 0 deletions tests/BalanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public function testArtisanRefresh(): void
$amount = \random_int(10, 10000);
$confirmed = (bool)\random_int(0, 1);
$deposit = $wallet->deposit($amount, null, $confirmed);
$this->assertIsInt($deposit->wallet_id);

if ($confirmed) {
$sums[$name] += $amount;
Expand Down

0 comments on commit 68402f6

Please sign in to comment.