phpantom_lsp 0.7.0

Fast PHP language server with deep type intelligence. Generics, Laravel, PHPStan annotations. Ready in an instant.
Documentation
// test: Generator with single type param resolves item type in foreach
// feature: completion
// Adapted from phpactor generics/generator_2.test
// expect: intValue(
---
<?php
class IntWrapper {
    public function intValue(): int {}
}
class Foobar {
    /**
     * @return \Generator<IntWrapper>
     */
    public function gen(): \Generator
    {
    }
}
$foo = new Foobar();
foreach ($foo->gen() as $bar) {
    $bar-><>
}