-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Call to deprecated method loadRevision() of class Drupal\Core\Entity\EntityStorageInterface #586
Comments
Are you able to add stubs to your project to test out if additional stubs are needed? This is enough of a data sample to add a proper test here. I thought I did, maybe I was lazy and didn't |
I tried to add stub for ContentEntityStorageInterface but to no avail. I think maybe this might extend into issues with |
could we hack core and see if reversing the order of implementing the interfaces fixes things? I'm still seeing this. Will probably just ignore the warnings since it is a false positive, but it would be nice to fix this more properly. |
To clarify I think I only messed with stubs and not core files - or if I did only minor tweaks like to drop the additional interface. Definitely worth digging into. |
I just realized we could have a proper test for this by scanning some Drupal core code. With #595 this showed up in the baseline test. So the PHPUnit test would need to scan one of those files and we can try to fix it. |
The issue was fixed in mglaman/phpstan-drupal version 1.2.0. See: mglaman/phpstan-drupal#586 Change-Id: I3b76e74073e949f38e58fac0d8a2d0a27d959ec2 Issue-Link: https://project.pronovix.net/issues/24582
I'm still getting this error even on 1.2.0. An example line that is triggering it in our custom code:
|
I'm running into this issue as well, using PHPStan Drupal 1.2.10. I got false positives for both loadRevision and deleteRevision. |
Bug report
Using phpstan-drupal 1.1.36
Code snippet that reproduces the problem
I think this is fixed previously already in #576 but only for
RevisionableStorageInterface
. I think the issue lies in the way that ContentEntityStorageInterface inherits its interfaces separately withEntityStorageInterface
andTranslatableRevisionalStorageInterface
which then inheritsRevisionableStorageInterface
which then inheritsEntityStorageInterface
. I think perhaps that additionalEntityStorageInterface
on theContentEntityStorageInterface
gets in the wayThe text was updated successfully, but these errors were encountered: