Commit 464a47d
(fix): CI — restore JSON decode for indexes in SQLite deleteAttribute/renameIndex
deleteAttribute and renameIndex call $this->getDocument(metadata, ...)
on the adapter directly, which doesn't apply the metadata 'json' filter
— so $collection->getAttribute('indexes', []) returns the raw JSON
string from the column. Commit 59c363c removed the json_decode under
the assumption the value was always pre-decoded; that's only true when
loaded via Database::getCollection().
The TypeError thrown from foreach() over a string surfaced as
testPurgeCollectionCache failing, and worse, testEvents threw before
its $database->on(..., null) cleanup ran — leaking the EVENT_ALL
listener into every later test that triggered an event, which is why
306 tests on SQLite started asserting '' matches null at
CollectionTests.php:1532.
Decode only when the value is still a string so both call paths work.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 18a995b commit 464a47d
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
615 | 618 | | |
616 | 619 | | |
617 | 620 | | |
| |||
662 | 665 | | |
663 | 666 | | |
664 | 667 | | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
665 | 671 | | |
666 | 672 | | |
667 | 673 | | |
| |||
0 commit comments