Skip to content

Commit

Permalink
Merge pull request bavix#153 from bavix/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rez1dent3 authored Mar 22, 2020
2 parents 8e82228 + a40acc7 commit 40d7f46
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
26 changes: 23 additions & 3 deletions 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]

## [5.0.2] - 2020-03-22
### Fixed
- fix `bindTo` method (v4.1)

## [5.0.1] - 2020-03-19
### Added
- Added a patch from version 4.2.1 #150
Expand All @@ -26,6 +30,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- all deprecated methods are removed
- `nesbot/carbon` is no longer needed for the library to work

## [4.2.2] - 2020-03-22
### Fixed
- fix `bindTo` method (v4.1)

## [4.2.1] - 2020-03-19
### Fixed
- Fixed wallet recalculate command #150
Expand All @@ -35,6 +43,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Add laravel 7 support

## [4.1.4] - 2020-03-22
### Fixed
- fix `bindTo` method

## [4.1.3] - 2020-03-20
### Added
- Added a patch from version 4.2.1 #150

## [4.1.2] - 2020-01-20
### Added
- add `$amountFloat` to Transaction model
Expand Down Expand Up @@ -477,11 +493,15 @@ 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/5.0.1...develop
[Unreleased]: https://github.com/bavix/laravel-wallet/compare/5.0.2...develop
[5.0.2]: https://github.com/bavix/laravel-wallet/compare/5.0.1...5.0.2
[5.0.1]: https://github.com/bavix/laravel-wallet/compare/5.0.0...5.0.1
[5.0.0]: https://github.com/bavix/laravel-wallet/compare/4.2.1...5.0.0
[5.0.0]: https://github.com/bavix/laravel-wallet/compare/4.2.2...5.0.0
[4.2.2]: https://github.com/bavix/laravel-wallet/compare/4.2.1...4.2.2
[4.2.1]: https://github.com/bavix/laravel-wallet/compare/4.2.0...4.2.1
[4.2.0]: https://github.com/bavix/laravel-wallet/compare/4.1.2...4.2.0
[4.2.0]: https://github.com/bavix/laravel-wallet/compare/4.1.4...4.2.0
[4.1.4]: https://github.com/bavix/laravel-wallet/compare/4.1.3...4.1.4
[4.1.3]: https://github.com/bavix/laravel-wallet/compare/4.1.2...4.1.3
[4.1.2]: https://github.com/bavix/laravel-wallet/compare/4.1.1...4.1.2
[4.1.1]: https://github.com/bavix/laravel-wallet/compare/4.1.0...4.1.1
[4.1.0]: https://github.com/bavix/laravel-wallet/compare/4.0.1...4.1.0
Expand Down
8 changes: 5 additions & 3 deletions src/Services/LockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@ public function lock($self, string $name, \Closure $closure)
* @param object $self
* @param \Closure $closure
* @return \Closure
* @throws
*/
protected function bindTo($self, \Closure $closure): \Closure
{
try {
$reflect = new \ReflectionFunction($closure);
if (strpos((string)$reflect, 'static') === false) {
return $closure->bindTo($self);
} catch (\Throwable $throwable) {
return $closure;
}

return $closure;
}

/**
Expand Down

0 comments on commit 40d7f46

Please sign in to comment.