Monday, November 12, 2012

Did KnpPaginator just break?

I just updated my symfony using Composer (which also updated my Doctrine etc). All of a sudden I now get the error 'Invalid parameter number: number of bound variables does not match number of tokens'.

I was able to fix this by making a change to /vendor/knplabs/knp-components/src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/ORM/QuerySubscriber.php


I changed line 27 from
$useDoctrineWalkers = version_compare(\Doctrine\ORM\Version::VERSION, '2.2.0', '>=');
to
$useDoctrineWalkers = false;
I use doctrine 2.3.x, which is the version you get when you use composer to update Symfony 2.1.x.


For the people that want to track the issue: https://github.com/KnpLabs/KnpPaginatorBundle/issues/123

No comments:

Post a Comment