Jan Nedbal
Jan Nedbal
IIRC, some things happen too early making this impossible. But not sure this is also the case.
I think you can easily use the same approach as [described in readme](https://github.com/shipmonk-rnd/composer-dependency-analyser?tab=readme-ov-file#detecting-classes-from-non-php-files) for this.
Replicated: https://github.com/phpstan/phpstan-doctrine/pull/609
Yes, because reflector see Event class as existing due to this stub: - phar:///app/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/SourceLocator/SourceStubber/../../../../../jetbrains/phpstorm-stubs/event/event.stub 
@ondrejmirtes added this condition [here](https://github.com/phpstan/phpstan-doctrine/commit/0edf5b0cf1ff0a85adeefe4b5c1a6ba238f961cc). I think we should be more careful where we do this check. Imo only in `->from(class-name)` etc. Not in such a generic way for every...
I believe it would be the same issue as https://github.com/phpstan/phpstan-doctrine/issues/566
We were actually using more from that, this was just the most simple example to show the bug. But since it is buggy and wont be maintained, we will disable...
> I need to think about it a bit. Any outcome how to properly fix this? Thx
You can easily deny the old approach by some super-simple CI script. We did the same thing here: https://github.com/shipmonk-rnd/phpstan-rules/pull/246
Also, since PHPUnit 11, it checks if data provider "named arguments" match the param names. And if not, PHPUnit fails hard. So that might also be part of the "invalid...