- Issue created by @sboden
- Status changed to Postponed: needs info
over 1 year ago 10:15am 14 August 2023 - 🇭🇺Hungary Gábor Hojtsy Hungary
Sounds like this may be because the class implements both the interface with the deprecated method and the new interface? Not sure if this would be possible to fix in phpstan-drupal. (Upgrade Status uses the report returned by phpstan-drupal -- and adds a lot on top).
You can use an interim variable and type-hint that with
@var
, see #2305593: [policy] Set a standard for @var inline variable type declarations → . Even then it will not "undo" that it has the interface that has the deprecated method, so may not fix the warning? Can you check? For the second case I can typehint to get rid of it.
For my first case, this is actually the exact statement how it should be changed "for the new way", and it should be figureoutable by the analyzer. After further checking I found this one: https://github.com/mglaman/phpstan-drupal/issues/586 so if it's fixed over there, it will also come to upgrade_status.
- Status changed to Closed: duplicate
over 1 year ago 1:11pm 14 August 2023 - 🇭🇺Hungary Gábor Hojtsy Hungary
Ah nice, nothing to do here then :) Thanks for the report! Closing as duplicate of the phpstan-drupal issue.