Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DbLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,6 @@ public function getIncrementalLastValue(): string
->whereNotNull($this->updateColumn)
->orderByDesc($this->updateColumn)
->limit(1)
->value($this->updateColumn);
->value($this->updateColumn) ?? '';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make more sense to return null|string ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely. I considered that, but hoped for this to cause the least amount of disruption. The if ($incremental) check correctly fails on an empty string, so everything else downstream runs correctly.

We could change the return type, but that would require additional refactors elsewhere and a version bump for anyone who might be using it (which is only us based on the repos I have access to, but I don't know what else is out there).

}
}