phpantom_lsp 0.7.0

Fast PHP language server with deep type intelligence. Generics, Laravel, PHPStan annotations. Ready in an instant.
Documentation
// test: list destructuring from conditional produces union — both types' members visible
// feature: completion
// Adapted from phpactor assignment/list_assignment.test
// ignore: ternary expression as RHS of list destructuring not yet resolved
// expect: fooMethod(
// expect: barMethod(
---
<?php

class Foo {
    public function fooMethod(): void {}
}

class Bar {
    public function barMethod(): void {}
}

function yesOrNo(): bool {}

[$transmitter, $receiver] = yesOrNo() ? [new Foo(), new Bar()] : [new Bar(), new Foo()];

$transmitter-><>