I recently ran into a hidden limitation in Symfony's Finder component.
find backed adapters use
-mmin to do their "modified since" comparing
and not the PHP based date comparator like I had assumed. This is important
because it turns out
-mmin is only accurate to a minute.
Finder was able to find changed files pretty easily. However, each time Finder ran after a file was found to be updated it would show the same file(s) as having been updated. I nearly pulled my hair out trying to figure out why this was happening.
The answer, of course, was that even though I was setting my date constraint
down to the second (based on the files actual updated time in seconds) that
time was being converted to a minute by the
find adapter. The end result
being that the same file would show up as having been "updated" for up to a
My workaround was to run an additional check on the updated time of each file found to ensure that any file returned by finder has actually been updated since the previous check. Far from ideal, but it works for now.