Commit a07ec0e
(fix): restore Document tenant int cast, validate relationship $id, fix PHPStan types
- Restore numeric-to-int cast in Document::getTenant() that was removed
in 89e7afc. MongoDB is type-strict: stored int 999 won't match query
string "999". The cast ensures tenant values stay as ints after the
ColumnType::Id string cast in castingAfter.
- Add validation for null $id on relationship Document values during
update, throwing RelationshipException instead of auto-creating.
- Fix PHPStan annotations: use inline @phpstan-ignore for Document
constructor calls, update MongoTenantFilter closure return type.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ed0b48a commit a07ec0e
File tree
3 files changed
+14
-6
lines changed- src/Database
- Hook
3 files changed
+14
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
| 151 | + | |
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
| |||
287 | 286 | | |
288 | 287 | | |
289 | 288 | | |
290 | | - | |
291 | | - | |
| 289 | + | |
292 | 290 | | |
293 | 291 | | |
294 | 292 | | |
| |||
536 | 534 | | |
537 | 535 | | |
538 | 536 | | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
539 | 541 | | |
540 | 542 | | |
541 | 543 | | |
| |||
0 commit comments