Nicolas PHILIPPE

Results 319 comments of Nicolas PHILIPPE

Hi @amyAMeQ thanks for the report, you're totally right about this, it could be improved. Problem is: I think it is not the same syntax between mysql (`ORDER BY RAND()`)...

you'll find an upgrade guide here: https://github.com/zenstruck/foundry/blob/1.x/UPGRADE-2.0.md (not 100% up to date) BTW don't hesitate to report any problems you'd find in 2.x branch :sweat_smile:

> Hoping I can find a way to do it in a database agnostic way sadly that's not possible. Doctrine does not ship any way to proceed a random. You'll...

hey @mdeboer this sounds like a good idea, do you think it is doable with `doctrine/persistence` only? we're abstracting away the DBMS (Mongo included) thanks to `doctrine/persistence`, this would be...

I just saw your edit: isn't `doctrine/persistence` + dbal helps with this? here is the prototype of `ObjectRepositroy::findBy()`: ```php public function findBy( array $criteria, ?array $orderBy = null, ?int $limit...

A benchmark which can be reused from time to time to ensure there is not a performance issue before a release would be definitely very useful!

> I mean, it could be a lot of queries how I understand it, it would be one extra query per "random" call, but I think this is worth it!

hum it could be challenging for `randomRange()` maybe 🤔

Hi @mdeboer this is very cool! We were actually talking with @kbond the we would like to add a CI check about performances, using PHPBench, maybe based on [this example](https://github.com/loophp/iterators/blob/000dc502edf1ee61eacf2d3a77f03210426bcb60/.github/workflows/benchmarks.yml#L67)...