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

Non-internal SerializationVisitorInterface implements internal VisitorInterface #1285

Open
boesing opened this issue Feb 18, 2021 · 0 comments

Comments

@boesing
Copy link
Contributor

boesing commented Feb 18, 2021

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? kinda

Hey there,

currently switching over from phpstan to psalm and realized that psalm addresses my SerializationVisitorInterface implementation of using internal methods from jms/serializer.

I had to verify that and stumbled on the @internal annotation within the VisitorInterface.

I think, this is due to the fact, that no one should directly depend on that interface (as already addressed in other issues).
Sadly, there is no way of not implementing the methods of VisitorInterface when implementing SerializationVisitorInterface.

I had some similar issues in another package of mine and fixed it, by also adding the methods to the depending interface.

Before

https://3v4l.org/JrKgU
https://psalm.dev/r/5212ac11f7

After

https://3v4l.org/a0HPa
https://psalm.dev/r/7f54d8996a

I wonder if this might be a scenario for this package without having a BC break?

I've seen #1161 but not sure if this is related. I just want to get rid of psalms error that we are using internal methods which are actually not internal.

Steps required to reproduce the problem

https://3v4l.org/JrKgU

Expected Result

https://psalm.dev/r/7f54d8996a

Actual Result

https://psalm.dev/r/5212ac11f7

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

1 participant