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

Privately imported trait methods are not reported #1190

Closed
weirdan opened this issue Jan 9, 2019 · 2 comments
Closed

Privately imported trait methods are not reported #1190

weirdan opened this issue Jan 9, 2019 · 2 comments
Labels

Comments

@weirdan
Copy link
Collaborator

weirdan commented Jan 9, 2019

Methods could also be imported as private: https://3v4l.org/R9gM8
Currently Psalm fails to detect public calls to such privatised methods: https://getpsalm.org/r/3e50cee4ef

Originally posted by @weirdan in 4d95962#commitcomment-31861520

<?php
  trait T {
    public function f(): void {}
  }
  class C {
    use T { f as private; }
  }

  (new C)->f();

Expected issue: call to a private method from outside of the class
Actual: No issues.

@muglug muglug added the bug label Jan 9, 2019
@muglug
Copy link
Collaborator

muglug commented Jan 9, 2019

*sigh* thanks. I don't really understand the point of this feature.

@muglug
Copy link
Collaborator

muglug commented Jan 10, 2019

Oh this is actually a dupe of #909

@muglug muglug closed this as completed Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants