Skip to content

Changing Trait Method Visibility Creates False Positive Error (PHP1416) #854

Description

@jj15asmr

Hello,

I have a class that uses a trait with methods of protected visibility. In my class, I'm changing the visibility of these methods to public:

class Foo
{
    use Bar { baz as public; qux as public; }
}

I'm able to access these methods just fine from outside of the class as expected, but the VS Code extension (v1.58.17223) shows a false positive error: Member has protected visibility and is not accessible from the current context. PHP(PHP1416).

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions