diff --git a/packages/command-bus/src/AsyncCommandRepositories/FileCommandRepository.php b/packages/command-bus/src/AsyncCommandRepositories/FileCommandRepository.php index 84ebdfb1e1..b7759e9822 100644 --- a/packages/command-bus/src/AsyncCommandRepositories/FileCommandRepository.php +++ b/packages/command-bus/src/AsyncCommandRepositories/FileCommandRepository.php @@ -53,6 +53,10 @@ public function getPendingCommands(): array { return arr(glob(__DIR__ . '/../stored-commands/*.pending.txt')) ->mapWithKeys(function (string $path) { + if (! Filesystem\is_file($path)) { + return; + } + $uuid = str_replace('.pending.txt', '', pathinfo($path, PATHINFO_BASENAME)); $payload = Filesystem\read_file($path);