Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class constants not recognized #666

Closed
taisph opened this issue Sep 24, 2024 · 4 comments
Closed

Class constants not recognized #666

taisph opened this issue Sep 24, 2024 · 4 comments
Assignees

Comments

@taisph
Copy link

taisph commented Sep 24, 2024

Response is recognized and Ctrl clickable, HTTP_ACCEPTED is not. But it is oddly counted as a reference in the Response class.

<?php

declare(strict_types=1);

namespace Foo;

use Symfony\Component\HttpFoundation\Response;

class Bar
{
    public function doFoo(): int
    {
        return Response::HTTP_ACCEPTED;
    }
}

Extension version: v1.51.16045

@jakubmisek
Copy link
Member

Thank you for reporting the issue; we have a fix already and preparing an update.

@jakubmisek jakubmisek self-assigned this Sep 24, 2024
@ging-dev
Copy link

Thank you for reporting the issue; we have a fix already and preparing an update.

Same problem with self and static

<?php

class A {
    public function test() {
        self::ging();
        static::ging();
    }

    private static function ging() {

    }
}

@taisph
Copy link
Author

taisph commented Sep 25, 2024

Seems to have improved with v1.51.16078 however parent::method() doesn't work. I'll file a new issue if that's unrelated.

@jakubmisek
Copy link
Member

Thanks! fixed and preparing (another) update.

(This was all caused after we introduced code completion after more complex expressions, i.e. $variable:: or A::B::C)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants