Commit 6bd1380
committed
fix: disable autoloading in typeIsValid to prevent fatal errors during generation
class_exists() in typeIsValid() triggers the autoloader, which can cause
fatal errors during code generation when a freshly-generated class extends
a parent class that hasn't been generated yet. The generation order of
structs is non-deterministic, so this produces intermittent failures.
Passing false as the second argument to class_exists() disables autoloading.
The subsequent stringIsValid() check still validates the type string format,
so there is no loss of validation coverage.1 parent 47fcae1 commit 6bd1380
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| |||
0 commit comments