statamic / eloquent-driver

Provides support for storing your Statamic data in a database, rather than flat files.
https://statamic.dev/tips/storing-content-in-a-database
MIT License
104 stars 71 forks source link

Apply syncOriginal for dirty state tracking #248

Closed jasonvarga closed 4 months ago

jasonvarga commented 4 months ago

This goes along with statamic/cms#5502 to allow isDirty etc to work correctly when using the Eloquent driver.

jasonvarga commented 4 months ago

The changes in the tests were because collections are technically required, although in the simple test cases they never got to the real world usage where collection would be used, so they passed.

Now that syncOriginal is being called, it looks for the collection and caused an error. These changes add collections where necessary.

jasonvarga commented 4 months ago

Tests will break until Statamic 4.51.0 is released.