Putting an iterable typehinted item into a foreach (in my code these are \Generator and array) shows a problem where the code works perfectly fine. This inspection doesn't seem quite right in that regard.
Here's an example:
function generate(): \Generator
{
yield 'this is ';
yield 'an example';
}
function iterate(iterable $iter)
{
foreach ($iter as $i) {
echo $i;
}
}
iterate(generate());
This executes fine, but the inspection highlights a problem area at $iter.
Can you please post a code that shows that issue?
@royallthefourth : let me check if I can reproduce this (we re-worked the inspection in the upcoming release). Or perhaps code fragment would speed up investigation a lot =)
Thank you @royallthefourth, checking this.
Seems to be resolved:

To not wait for the release you can download PhpInspectionsEA.jar from master branch and install it manually: File -> Setting -> Plugins, under the plugin list click "Install from disk" and select the downloaded file.
The dev-build is stable: @funivan and me running dev builds.
Can not iterate 'iterable' (must implement one of iterator interfaces)
I get this message over variable which is returned from function with return type iterable
function() : iterable
installed version 2.3.6
@kalessil will it help in this particular case?
Thank you in advance

@whale001 : thanks for reporting, yes all needed information is here.
EDIT: obviously the fix needs to be extended.
@kalessil Thank you for awesome plugin
You are welcome @whale001 =)
I added support for the iterable type.
Most helpful comment
Can you please post a code that shows that issue?