Commit 1d92d9d
committed
feat(builder): AC3+AC5+AC6 - extract newModelCachingEloquentBuilder, trait-collision fixtures, phpstan config
- Extract core builder logic into public newModelCachingEloquentBuilder() helper so models
with a newEloquentBuilder trait collision can call it directly from an override (AC6 / #535)
- Add docblock documenting the insteadof and as resolution patterns for trait collisions
- Add phpstan.neon configured at level 5 to verify no false-positive undefined method errors
on custom builder call sites (AC5)
- Add FakeNodeTrait fixture and AuthorWithTraitCollision model to reproduce the AC6 collision
- Add two new integration tests: testTraitCollisionResolvesWithoutFatalError and
testTraitCollisionModelStillCachesResults
- All 9 custom-builder tests pass (7 original + 2 new)
AC coverage: AC1 through AC6 all addressed1 parent 20b5737 commit 1d92d9d
File tree
6 files changed
+193
-31
lines changed- src/Traits
- tests
- Fixtures
- Integration/CachedBuilder
6 files changed
+193
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| |||
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | | - | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
109 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
110 | 174 | | |
111 | 175 | | |
112 | 176 | | |
| |||
135 | 199 | | |
136 | 200 | | |
137 | 201 | | |
138 | | - | |
| 202 | + | |
139 | 203 | | |
140 | 204 | | |
141 | 205 | | |
| |||
148 | 212 | | |
149 | 213 | | |
150 | 214 | | |
151 | | - | |
| 215 | + | |
152 | 216 | | |
153 | 217 | | |
154 | 218 | | |
| |||
160 | 224 | | |
161 | 225 | | |
162 | 226 | | |
163 | | - | |
| 227 | + | |
164 | 228 | | |
165 | 229 | | |
166 | 230 | | |
167 | | - | |
| 231 | + | |
168 | 232 | | |
169 | 233 | | |
170 | 234 | | |
| |||
175 | 239 | | |
176 | 240 | | |
177 | 241 | | |
178 | | - | |
179 | | - | |
| 242 | + | |
| 243 | + | |
180 | 244 | | |
181 | 245 | | |
182 | 246 | | |
| |||
| 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 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 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 | + | |
0 commit comments