I found that the text for $entity->modified() from pull #423 wasn't testing for sub-documents, arrays, or document arrays. I updated the test and made several modifications to fix the failures I found.
I'm nervous that we're still missing test cases. Fixing modified() to not just assume every field is modified is pretty dangerous because if this goes to master with a bug, then people running on master will have incorrect data in their databases.
handling of nested modified data in documents when calling document->…
Then I'll merge it to dev after the next time dev and master are synced, and then we can rebase data off of it and continue adding tests there.
Honestly, I'm not too terribly concerned, as modified() is only a convenience accessor, and isn't used in the query-generation process (see export() for that). Also, until recently it was almost completely useless due to some separate framework changes and previous lack of tests (* hides shame *).