Skip to content

Commit 40d7f46

Browse files
authored
Merge pull request bavix#153 from bavix/develop
Develop
2 parents 8e82228 + a40acc7 commit 40d7f46

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

changelog.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [5.0.2] - 2020-03-22
10+
### Fixed
11+
- fix `bindTo` method (v4.1)
12+
913
## [5.0.1] - 2020-03-19
1014
### Added
1115
- Added a patch from version 4.2.1 #150
@@ -26,6 +30,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2630
- all deprecated methods are removed
2731
- `nesbot/carbon` is no longer needed for the library to work
2832

33+
## [4.2.2] - 2020-03-22
34+
### Fixed
35+
- fix `bindTo` method (v4.1)
36+
2937
## [4.2.1] - 2020-03-19
3038
### Fixed
3139
- Fixed wallet recalculate command #150
@@ -35,6 +43,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3543
### Added
3644
- Add laravel 7 support
3745

46+
## [4.1.4] - 2020-03-22
47+
### Fixed
48+
- fix `bindTo` method
49+
50+
## [4.1.3] - 2020-03-20
51+
### Added
52+
- Added a patch from version 4.2.1 #150
53+
3854
## [4.1.2] - 2020-01-20
3955
### Added
4056
- add `$amountFloat` to Transaction model
@@ -477,11 +493,15 @@ The operation is now executed in the transaction and updates the new `refund` fi
477493
- Exceptions: AmountInvalid, BalanceIsEmpty.
478494
- Models: Transfer, Transaction.
479495

480-
[Unreleased]: https://github.com/bavix/laravel-wallet/compare/5.0.1...develop
496+
[Unreleased]: https://github.com/bavix/laravel-wallet/compare/5.0.2...develop
497+
[5.0.2]: https://github.com/bavix/laravel-wallet/compare/5.0.1...5.0.2
481498
[5.0.1]: https://github.com/bavix/laravel-wallet/compare/5.0.0...5.0.1
482-
[5.0.0]: https://github.com/bavix/laravel-wallet/compare/4.2.1...5.0.0
499+
[5.0.0]: https://github.com/bavix/laravel-wallet/compare/4.2.2...5.0.0
500+
[4.2.2]: https://github.com/bavix/laravel-wallet/compare/4.2.1...4.2.2
483501
[4.2.1]: https://github.com/bavix/laravel-wallet/compare/4.2.0...4.2.1
484-
[4.2.0]: https://github.com/bavix/laravel-wallet/compare/4.1.2...4.2.0
502+
[4.2.0]: https://github.com/bavix/laravel-wallet/compare/4.1.4...4.2.0
503+
[4.1.4]: https://github.com/bavix/laravel-wallet/compare/4.1.3...4.1.4
504+
[4.1.3]: https://github.com/bavix/laravel-wallet/compare/4.1.2...4.1.3
485505
[4.1.2]: https://github.com/bavix/laravel-wallet/compare/4.1.1...4.1.2
486506
[4.1.1]: https://github.com/bavix/laravel-wallet/compare/4.1.0...4.1.1
487507
[4.1.0]: https://github.com/bavix/laravel-wallet/compare/4.0.1...4.1.0

src/Services/LockService.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,16 @@ public function lock($self, string $name, \Closure $closure)
4242
* @param object $self
4343
* @param \Closure $closure
4444
* @return \Closure
45+
* @throws
4546
*/
4647
protected function bindTo($self, \Closure $closure): \Closure
4748
{
48-
try {
49+
$reflect = new \ReflectionFunction($closure);
50+
if (strpos((string)$reflect, 'static') === false) {
4951
return $closure->bindTo($self);
50-
} catch (\Throwable $throwable) {
51-
return $closure;
5252
}
53+
54+
return $closure;
5355
}
5456

5557
/**

0 commit comments

Comments
 (0)