Skip to content

magic methods do not appear in autocomplete #92

@Bleksak

Description

@Bleksak

PHPantom version

phpantom_lsp 0.7.0-58-g27e9a1a

Installation method

Built from source

Operating system

Linux x86_64

Editor

Neovim

Bug description

Image

I think some magic methods like __invoke and __toString should be visible in autocomplete.

Steps to reproduce

file:

<?php

declare(strict_types=1);


namespace Bleksak\MagoTest;

class X {
    public function __invoke():void {}
    public function __test(): void {}
    public function __toString(): string { return 'a'; }
}

$x = new X();
$x->_; // <-- put cursor at _ and trigger autocompletion

Error output or panic trace


.phpantom.toml

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions