Task/Doctrine/DoctrineReaderTask.php
protected function initIterator(EntityRepository $repository, array $options)
    {
        $qb = $this->getQueryBuilder(
            $repository,
            $options['criteria'],
            $options['order_by'],
            $options['limit'],
            $options['offset']
        );

        $this->iterator = $qb->getQuery()->iterate();
        $this->iterator->next(); // Move to first element
    }
protected function initIterator(EntityRepository $repository, array $options)
    {
        $qb = $this->getQueryBuilder(
            $repository,
            $options['criteria'],
            $options['order_by'],
            $options['limit'],
            $options['offset']
        );

        $this->iterator = $qb->getQuery()->iterate();
        $this->iterator->next(); // Move to first element
    }
@param EntityRepository $repository
@param array            $options

@throws \UnexpectedValueException