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

Method calls from interface implementations are not detected #212

Merged
merged 2 commits into from
Jul 26, 2023

Conversation

enumag
Copy link
Contributor

@enumag enumag commented Jul 25, 2023

Similar case as my old PR (#26) but for interfaces.

Same as before I just added a failing test case. I didn't look for the underlying issue.


Use case: After running into guzzle/psr7#569 I wanted to disallow Psr\Http\Message\StreamInterface::getContents() but looks like this isn't supported yet.

@enumag enumag force-pushed the disallowed-interface-method branch from 2e1b501 to 82dbc52 Compare July 25, 2023 15:44
@spaze
Copy link
Owner

spaze commented Jul 25, 2023

Thanks, yeah, this isn't supported yet. But I guess it should be, it's already supported for constructors so you'd expect it to be supported for method calls as well.

@spaze
Copy link
Owner

spaze commented Jul 25, 2023

enumag and others added 2 commits July 26, 2023 04:44
Checking interfaces is already supported for `new Class` so it makes sense to check them in calls too.
@spaze spaze force-pushed the disallowed-interface-method branch from 82dbc52 to 4005114 Compare July 26, 2023 02:47
@spaze spaze merged commit adf917d into spaze:main Jul 26, 2023
62 checks passed
@enumag
Copy link
Contributor Author

enumag commented Jul 26, 2023

Oh, you fixed it already. Thanks! I tried it on my side and it detects the case I need correctly now. Do you want to do something else before tagging a release? :)

@spaze spaze self-assigned this Jul 26, 2023
@spaze
Copy link
Owner

spaze commented Jul 26, 2023

Yeah, wanted to sleep a bit 😅 This has now been released in 2.16.0, thanks for the help!

@enumag
Copy link
Contributor Author

enumag commented Jul 26, 2023

😆 Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants