Skip to content

Commit

Permalink
feat: php-7.1 supports
Browse files Browse the repository at this point in the history
Signed-off-by: Fery Wardiyanto <ferywardiyanto@gmail.com>
  • Loading branch information
feryardiant committed Jun 15, 2020
1 parent af105ce commit 3d62f9e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4']
php-versions: ['7.1', '7.2', '7.3', '7.4']

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
},
"require": {
"php": "^7.2",
"php": "^7.1",
"psr/container": "^1.0"
},
"require-dev": {
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/Container/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ public function handle(callable $instance, array $args = [])
if (is_string($instance) && false !== strpos($instance, '::')) {
$instance = explode('::', $instance);
} elseif (is_object($instance)) {
$instance = (new \ReflectionMethod($instance, '__invoke'))->getClosure($instance);
$instance = (new \ReflectionMethod($instance, '__invoke'))
->getClosure($instance)
->bindTo($instance);
}

$params = [];
Expand Down

0 comments on commit 3d62f9e

Please sign in to comment.