Open
Description
Don't know if this is something for this project but it seems like it might be able to help. When using DrushStyle with recent versions of Drush 11 you'll run into this problem:
------ ---------------------------------------------------------------------
Line web/modules/custom/my_custom/src/Commands/DrushCommandBase.php
------ ---------------------------------------------------------------------
20 Instantiated class Drush\Style\DrushStyle not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ ---------------------------------------------------------------------
This is caused by a fix they added dynamically load different classes to support Symfony 6 and changed method signatures. 06eb4a45296e409c6af9b592d8bec0f555adedd8 Looking at the commit there are a number of other classes this would affect as well.
The problem seems to be that the class lives outside packagist autoloading so phpstan isn't picking it up. Drush is adding the root dynamically during preflight sort of like drupal module namespaces but based on the detected Symfony version which... could make things complicated.