Skip to content

Commit 6e2e208

Browse files
nicolas-grekasfabpot
authored andcommitted
Bump minimum version of PHP to 8.1
1 parent 3042180 commit 6e2e208

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

GenericRuntime.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,7 @@ public function __construct(array $options = [])
8888
*/
8989
public function getResolver(callable $callable, \ReflectionFunction $reflector = null): ResolverInterface
9090
{
91-
if (!$callable instanceof \Closure) {
92-
$callable = \Closure::fromCallable($callable);
93-
}
94-
91+
$callable = $callable(...);
9592
$parameters = ($reflector ?? new \ReflectionFunction($callable))->getParameters();
9693
$arguments = function () use ($parameters) {
9794
$arguments = [];
@@ -139,7 +136,7 @@ public function getRunner(?object $application): RunnerInterface
139136
throw new \LogicException(sprintf('"%s" doesn\'t know how to handle apps of type "%s".', get_debug_type($this), get_debug_type($application)));
140137
}
141138

142-
$application = \Closure::fromCallable($application);
139+
$application = $application(...);
143140
}
144141

145142
if ($_SERVER[$this->options['debug_var_name']] && ($r = new \ReflectionFunction($application)) && $r->getNumberOfRequiredParameters()) {

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=8.0.2",
18+
"php": ">=8.1",
1919
"composer-plugin-api": "^1.0|^2.0"
2020
},
2121
"require-dev": {

0 commit comments

Comments
 (0)