This package contains a file watcher based on symfony/messenger and michaelpetri/php-git.
Since it is based on git it can emmit events for files even after it has been paused for a decent time. All changes will
trigger a FileCreated
, FileChanged
or FileDeleted
event which then can be handled by an event handler.
Note: Keep in mind that git is not good at handling binary files and using this package can lead to bloated disk usage!
composer require michaelpetri/symfony-file-watcher
# messenger.yaml
transports:
my-file-watcher:
dsn: 'watch:///absolute/path/to/files?timeout=60000' # timeout in milliseconds
bin/console messenger:setup
bin/console messenger:consume my-file-watcher
By using cutting-edge technology, process automation and taking responsibility for integration, synchronization, quality and consistency of your data.