Commit eb31077
Convert rule-facing FiberScope at the new-world hook boundary
Replaces the blanket processExprNode conversion with the root cause: the
hooks are the boundary between the rule-facing world and the engine.
Rules hold FiberScopes and feed them straight into the old-world
dispatcher (ImpossibleCheckTypeHelper passes the rule's scope to
specifyTypesInCondition, phpstan-phpunit's assert extension builds a
synthetic BooleanOr there), so resolveTypeOfNewWorldHandlerNode() and
specifyTypesOfNewWorldHandlerNode() can run with $this being a
FiberScope. They now call toMutatingScope() - identity on a plain scope,
a state-preserving copy on a FiberScope - before invoking result
callbacks and on-demand processing.
Without the conversion the engine processes synthetic nodes on the
rule-facing scope, whose type asks suspend: wasteful inside a rule
fiber, fatal outside one ("Cannot suspend outside of a fiber"). Found
by an ExpressionResult creation tripwire after the CI-only crash never
reproduced locally.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent be672de commit eb31077
2 files changed
Lines changed: 15 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1012 | 1012 | | |
1013 | 1013 | | |
1014 | 1014 | | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1015 | 1020 | | |
1016 | 1021 | | |
1017 | 1022 | | |
| |||
1023 | 1028 | | |
1024 | 1029 | | |
1025 | 1030 | | |
1026 | | - | |
| 1031 | + | |
1027 | 1032 | | |
1028 | 1033 | | |
1029 | 1034 | | |
1030 | 1035 | | |
1031 | 1036 | | |
1032 | 1037 | | |
1033 | | - | |
| 1038 | + | |
1034 | 1039 | | |
1035 | 1040 | | |
1036 | 1041 | | |
1037 | | - | |
| 1042 | + | |
1038 | 1043 | | |
1039 | 1044 | | |
1040 | 1045 | | |
| |||
1077 | 1082 | | |
1078 | 1083 | | |
1079 | 1084 | | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
1080 | 1089 | | |
1081 | 1090 | | |
1082 | 1091 | | |
1083 | 1092 | | |
1084 | | - | |
| 1093 | + | |
1085 | 1094 | | |
1086 | 1095 | | |
1087 | 1096 | | |
1088 | 1097 | | |
1089 | 1098 | | |
1090 | 1099 | | |
1091 | | - | |
| 1100 | + | |
1092 | 1101 | | |
1093 | 1102 | | |
1094 | 1103 | | |
1095 | | - | |
| 1104 | + | |
1096 | 1105 | | |
1097 | 1106 | | |
1098 | 1107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
2804 | 2803 | | |
2805 | 2804 | | |
2806 | 2805 | | |
2807 | | - | |
2808 | | - | |
2809 | | - | |
2810 | | - | |
2811 | | - | |
2812 | | - | |
2813 | | - | |
2814 | | - | |
2815 | | - | |
2816 | 2806 | | |
2817 | 2807 | | |
2818 | 2808 | | |
| |||
0 commit comments