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

No autocomplete when using Traits #28

Closed
ghost opened this issue Sep 25, 2017 · 8 comments
Closed

No autocomplete when using Traits #28

ghost opened this issue Sep 25, 2017 · 8 comments

Comments

@ghost
Copy link

ghost commented Sep 25, 2017

When a class uses a trait there is no autocomplete for the methods that it should then have access to.

i.e.

trait UserTrait {
    /**
     * isAdmin
     *
     * @return boolean
     */
    public function isAdmin() {
        ...
    }
}
class User {
    use UserTrait;
}

Under the given/similar scenario there is nothing that shows up in autocomplete that would suggest that isAdmin() method should be available for a User object.

@bmewburn
Copy link
Owner

bmewburn commented Nov 5, 2017

Is this still an issue with v0.8.0?

@calebporzio
Copy link

@bmewburn - I'm having this issue with v0.8.2

symbol search, goto definition, and global symbol with traits all don't work for me.

Laravel uses Traits pretty heavily so this is really inconvenient - let me know any way I can help you troubleshoot or move this forward

Thanks for producing the best php intellesense package for VS Code!

@bmewburn
Copy link
Owner

I'm not experiencing the same issues. Using the code in the original post above I'm getting suggestions for isAdmin, workspace symbols, goto def etc all work. Mocha tests are passing too. @calebporzio can you share a code snippet or any other info that might help solve this?

@calebporzio
Copy link

So, turns out my personal problem is not with Traits, it's with indexing. I opened a new issue #38

@fieu
Copy link

fieu commented Aug 14, 2020

I'm having the same problem.

@lordskynner
Copy link

Same problem here
v1.5.4

@olafsozanski
Copy link

Same problem, just updated Intelephense

@bmewburn
Copy link
Owner

bmewburn commented Jan 9, 2021

@olafsozanski please open a new issue with a minimal reproducible example

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

5 participants