Hi,
I'm getting the error _"Expected type 'Closure'. Found 'callable|#Function#eb14f754'"_ with this simple code:
<?php
function test(\Closure $closure) {
}
test(function() {
});
Here is the error message:
{
"resource": "/d:/temp/test.php",
"owner": "_generated_diagnostic_collection_name_#1",
"code": "10006",
"severity": 8,
"message": "Expected type 'Closure'. Found 'callable|#Function#eb14f754'.",
"source": "intelephense",
"startLineNumber": 7,
"startColumn": 6,
"endLineNumber": 9,
"endColumn": 2
}
The version used is 1.0.1 (2019-02-20).
As far as I can understand the code describes the only way to create a Closure ( https://secure.php.net/manual/en/functions.anonymous.php ) so it shouldn't be highlighted as an type error.
Thanks!
Yep, getting a lot of all kind of errors with type hinting with v1.
A workaround is to downgrade to v0.8.8. It can be done from vscode extension manager.
Same issue https://github.com/bmewburn/vscode-intelephense/issues/183#issuecomment-466009432
Same here.

@apihlaja , is it possible to disable some hints? I wouldn't like to downgrade because I think this version is great despite these bugs.
I've found a "workaround" but I don't like it. I have a lot of callables in my projects.

Also experiencing the same issue, when is 1.1 likely to be released?
Most helpful comment
Yep, getting a lot of all kind of errors with type hinting with v1.
A workaround is to downgrade to v0.8.8. It can be done from vscode extension manager.