Neat project! I love the simplicity and speed. I did some benchmarking and the test_it_generates_unique_ids() test uses assertNotContains() in a loop of 1000 iterations. On my machine, this test takes about 165312875 nanoseconds to run. When replacing the assertNotContains() call to a single assertSame() call at the end of the loop, the test drops to about 869500 nanoseconds, an improvement of 3 orders of magnitude.
public function test_it_generates_unique_ids()
{
$ids = [];
for ($i = 0; $i < 1000; $i++) {
$ids[] = ObjectId::generate();
}
$this->assertSame($ids, array_unique($ids));
}
Would you like me to open a PR?