Fix compatibility with DBAL 2.8 (doctrine/dbal#3157)#7290
Fix compatibility with DBAL 2.8 (doctrine/dbal#3157)#7290Majkl578 merged 1 commit intodoctrine:2.6from
Conversation
lcobucci
left a comment
There was a problem hiding this comment.
Code LGTM, I'd suggest to add more details to the commit message or add a comment in the code. It might be complicated to understand this after some time.
|
|
||
| $this->assertEquals('SELECT c0_.id AS id_0, c0_.status AS status_1, c0_.username AS username_2, c0_.name AS name_3, c0_.email_id AS email_id_4 FROM cms_users c0_ LIMIT 10 OFFSET 0', $q->getSql()); | ||
| self::assertThat( | ||
| $q->getSql(), |
There was a problem hiding this comment.
Does it use DBAL\QueryBuilder internally? If yes, maybe the test could be improved by only making sure that the values passed to Query::setMaxResults() and Query::setFirstResult() are passed down to the QueryBuilder as is.
E.g. if instead of getSql() we could get the internal QueryBuilder and check its state, we could get rid of the dependency on SQL.
If it's not possible, then I'm fine with this solution.
There was a problem hiding this comment.
It's not using DBAL builder, but SQL walker.
There was a problem hiding this comment.
There was a problem hiding this comment.
@morozov it doesn't using the query builder internally but rather a compiles a DQL and translates it into SQL using a Query object.
c85b547 to
ac1e1c7
Compare
|
@lcobucci Added comment + reworded. |
|
Meh, Scrutinizer is not working properly... :S |
Forward-compat for doctrine/dbal#3157.