Closed VincentLanglet closed 3 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The package will be deprecated anyway.
The sonata datagrid bundle is exposing
Sonata\DatagridBundle\Pager\Doctrine\Pager :
doctrine/orm
library. But this one is only in the require-dev of thecomposer.json
.Sonata\DoctrineORMAdminBundle\Datagrid\Pager
but without all the improvement/bugfix made recently.Sonata\DatagridBundle\Pager\Elastica\Pager :
Elastica\Search
class. But nothing is require in thecomposer.json
.$countQuery->getResults()->getTotalHits();
which can't work sincegetResults
return an array according to the interface. There are some other weird stuff in the class that makes me think this one doesn't work.Sonata\DatagridBundle\ProxyQuery\Doctrine\ProxyQuery :
doctrine/orm
library. But this one is only in the require-dev of thecomposer.json
.Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQuery
but without all the improvement/bugfix made recently.Sonata\DatagridBundle\ProxyQuery\Elastica\ProxyQuery :
Elastica\Search
class. But nothing is require in thecomposer.json
.BasProxyQuery
class which works with aDoctrine\ORM\QueryBuilder
.$query->setSort
which can't work sincequery
is a doctrine querybuilder and doesn't have asetSort
function. There are some other weird stuff in the class that makes me think this one doesn't work.IMHO, the two Elastica classes doesn't work and should be removed.
And we should find a way to remove the
doctrine-orm
dependency from this bundle. We candoctrine/ORM
in order to not restrict the bundle to one doctrine storage.Sonata\DatagridBundle\ProxyQuery\Doctrine\ProxyQuery
andSonata\DatagridBundle\Pager\Doctrine\Pager
until we find a solution.A solution could be to deprecate
Sonata\DatagridBundle\ProxyQuery\Doctrine\ProxyQuery
in favor ofSonata\DoctrineORMAdminBundle\Datagrid\ProxyQuery
and same forPager
.