Commit eef73d6
fix: carry a value the grammar cannot model through as source text
occ runs inside the service container, so a value main cannot read is a
brick with no way to reach the command that would remove it. Recovery
needs filesystem access to config.php, which a StartOS user does not have.
Two such values are reachable from documented occ invocations, because
var_export writes them as expressions: PHP_INT_MIN, which
`config:system:set --type=integer` saturates any out-of-range negative
onto, and a NUL byte. Rather than teach the grammar those two literals,
Value falls back to capturing the source text of anything it cannot model
and the serializer re-emits it byte for byte.
The fallback needs a terminator lookahead to be reachable at all: Number
matches the leading -9223372036854775807 of PHP_INT_MIN, and PEG does not
retry an alternative once the enclosing sequence fails.
Bounded so malformed input still fails loudly rather than merging the
entries around it: Raw stops at a newline, since var_export never spreads
a scalar expression over two lines, and a bare positional entry may not be
raw. Verified against PHP 8.4 that a missing comma, a missing =>, an
unterminated string, an unterminated comment and a truncated file all
still throw.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 7ebec69 commit eef73d6
5 files changed
Lines changed: 555 additions & 139 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
| |||
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
135 | | - | |
| 141 | + | |
136 | 142 | | |
137 | 143 | | |
138 | 144 | | |
| |||
0 commit comments