Files
codebase-memory-mcp/tests
Martin Vogel da9f20d55a feat(php-lsp): generic templates, negative narrowing, expanded stdlib
Phase 4g+ / 4l / 5b additions toward LSP-server type-resolution parity:

  - Generic template parsing in PHPDoc: parse `Collection<User>`,
    `array<int, User>`, `iterable<T>`, `list<T>`, etc. Bind variables
    to CBM_TYPE_TEMPLATE; method dispatch on a TEMPLATE receiver
    resolves against the template's base class.
  - Foreach element-type propagation: `foreach ($users as $u)` where
    $users: array<User> binds $u to User. Two-arg array<K,V> takes
    V. Falls back to Iterator::current() return type for NAMED types
    that implement the iterator interface.
  - Negative narrowing: `if (!($x instanceof Foo)) return;` (or throw)
    narrows $x to Foo for the rest of the enclosing scope.
  - Foreach iterable can be an arbitrary expression (variable_name,
    member call, function call) — fixed earlier-too-narrow filter.
  - PHPDoc @var/@param accept generic syntax: type token now spans
    angle brackets so `array<User> $users` parses correctly.
  - Stdlib expansion (Laravel + Symfony): full Eloquent Builder
    method chain (where/orderBy/limit/get/first/...), Eloquent Model
    static factories, Illuminate\Support\Collection chains
    (map/filter/sort/...), Symfony HttpFoundation Request/Response,
    Carbon date methods, PSR-7 with*() builders.

Test suite: 81 -> 100 tests, all passing. Total: 2913 / 0.
2026-05-09 02:53:55 +02:00
..
2026-04-15 23:56:03 +02:00