Commit 48ee3bf
Fix dead catch false positive for dynamic class constant fetch
- Added implicit throw point for dynamic class constant fetch (e.g. Foo::{$name})
- Dynamic class constant fetches can throw \Error at runtime if the constant doesn't exist
- New regression test in tests/PHPStan/Rules/Exceptions/data/bug-13569.php
Closes phpstan/phpstan#135691 parent 1bbe9dc commit 48ee3bf
File tree
3 files changed
+25
-0
lines changed- src/Analyser
- tests/PHPStan/Rules/Exceptions
- data
3 files changed
+25
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3879 | 3879 | | |
3880 | 3880 | | |
3881 | 3881 | | |
| 3882 | + | |
3882 | 3883 | | |
3883 | 3884 | | |
3884 | 3885 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
684 | 689 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments