[0.x] DoctrineDriver: Fix "LIMIT 1FOR UPDATE" by MatthiasKuehneEllerhold · Pull Request #334 · bernardphp/bernard

Using bernardphp with the doctrine driver produces this invalid SELECT statement:

SELECT id, message FROM bernard_messages
WHERE queue = :queue AND visible = :visible
ORDER BY sentAt, id 
LIMIT 1FOR UPDATE

As you can see there is a space missing between "LIMIT 1" and "FOR UPDATE".

This error exists in 0.12.3 (latest stable) and the 0.x branch. It is fixed in the master though.

This error is thrown and silently ignored in the driver so it never makes it to the consumer. This makes it very hard to notice.