Open muglug opened 2 years ago
I was actually doing this in a branch at one point for some new tests I added but I think I ended up discarding it. I wonder if a better idea would be to allow caching stubs for tests? That way performance would also be improved for the many tests that do need the stubs.
Caching isn't really possible, as loading those stubs is part of the static reflection Psalm does each time.
Lots of tests don't need stubs.
tests/SwitchTypeTest.php
becomes about 5x faster when stubs loading is turned off.We should annotate individual tests to encode the ones that pass without stubs.