diff --git a/build/kint.phar b/build/kint.phar index b8ad56136..8834b715b 100644 Binary files a/build/kint.phar and b/build/kint.phar differ diff --git a/src/CallFinder.php b/src/CallFinder.php index 113007869..33e022e96 100644 --- a/src/CallFinder.php +++ b/src/CallFinder.php @@ -382,6 +382,11 @@ public static function getFunctionCalls(string $source, int $line, $function): a ]; } + // Skip first-class callables + if (KINT_PHP81 && 1 === \count($params) && '...' === $param['path']) { + continue; + } + // Get the modifiers --$index; diff --git a/tests/CallFinderTest.php b/tests/CallFinderTest.php index c8ac8f94b..6ab60577a 100644 --- a/tests/CallFinderTest.php +++ b/tests/CallFinderTest.php @@ -1101,6 +1101,28 @@ public function sourceProvider() ]; } + if (KINT_PHP81) { + $data['ignore firstclass callables'] = [ + ' 3, + 'function' => 'test', + 'result' => [ + [ + 'modifiers' => [], + 'parameters' => [ + [ + 'path' => '$a', + 'name' => '$a', + 'expression' => false, + ], + ], + ], + ], + ]; + } + if (KINT_PHP82) { $data['dnf types'] = [ '