phpantom_lsp 0.7.0

Fast PHP language server with deep type intelligence. Generics, Laravel, PHPStan annotations. Ready in an instant.
Documentation
// test: nested generic iterator chain resolves value type through extends and implements
// feature: hover
// Adapted from phpactor generics/gh-1875.test
// expect_hover: $value => string
---
<?php

/**
 * @template TKey
 * @implements Iterator<TKey, string>
 */
abstract class Test1 implements Iterator
{
}

/**
 * @extends Test1<int>
 */
class Test2 extends Test1
{
}

/** @var Test2 $a */
foreach ($a as $key => $value) {
    $value<>
}