Closed (fixed)
Project:
Upgrade Status
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2020 at 09:57 UTC
Updated:
17 Aug 2021 at 08:14 UTC
Jump to comment: Most recent
Comments
Comment #2
gábor hojtsySince a base class/interface cannot force a property to exist (that does not exist in the base class), phpstan will not be able to find such problems. We would need to write a custom runtime parser for classes that we can discover in the extension. Not sure exactly how to do it, we would need to discover all test classes and find the ones in the given extension and check if they have the property. A combination of PHP reflection and class discovery code from simpletest could do it. I am not likely to have time to implement this in the foreseeable future unfortunately.
Comment #3
gábor hojtsyComment #4
mglamanThis should be feasible in phpstan-drupal. Opened an issue: https://github.com/mglaman/phpstan-drupal/issues/191
Comment #5
mglamanComment #7
mglamanI just tagged https://github.com/mglaman/phpstan-drupal/releases/tag/0.12.12 which adds a rule to check for defaultTheme
Comment #9
gábor hojtsyWoot, thanks @mglaman!