JaverSphinxBundle icon indicating copy to clipboard operation
JaverSphinxBundle copied to clipboard

Add Symfony 4 examples

Open tacman opened this issue 6 years ago • 3 comments

Use Dependency Injection instead of the container.

tacman avatar Dec 03 '18 11:12 tacman

@tacman this code in your PR is not working

use Javer\SphinxBundle\Sphinx\Manager;
use Knp\Component\Pager\Pagination\PaginationInterface;
use Doctrine\ORM\EntityManagerInterface;
     public function __construct(EntityManagerInterface $em, 
                                PaginatorInterface $paginator,
                                Manager $sphinx)
                                
    private $sphinx;
    private $em;
    private $paginator;
                                
    {
        $this->sphinx = $sphinx;
        $this->em = $em;
        $this->paginator = $paginator;
    }

Do you declare the global function __construct()? Maybe this is a class code? Why do you declare properties in the middle of a function/method declaration?

peter-gribanov avatar Dec 03 '18 15:12 peter-gribanov

Yeah, you're right -- cut and paste was wrong. Sigh.

On Mon, Dec 3, 2018 at 10:05 AM Peter Gribanov [email protected] wrote:

@tacman https://github.com/tacman this code in your PR is not working

use Javer\SphinxBundle\Sphinx\Manager;use Knp\Component\Pager\Pagination\PaginationInterface;use Doctrine\ORM\EntityManagerInterface; public function __construct(EntityManagerInterface $em, PaginatorInterface $paginator, Manager $sphinx) private $sphinx; private $em; private $paginator; { $this->sphinx = $sphinx; $this->em = $em; $this->paginator = $paginator; }

Do you declare the global function __construct()? Maybe this is a class code? Why do you declare properties in the middle of a function/method declaration?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/javer/JaverSphinxBundle/pull/3#issuecomment-443741737, or mute the thread https://github.com/notifications/unsubscribe-auth/AAl0Qcz1zsOWmr_1BTDp4OdAhAeVpusOks5u1T3TgaJpZM4Y-Yfn .

tacman avatar Dec 03 '18 16:12 tacman

OK, I've fixed that now.

On Mon, Dec 3, 2018 at 11:31 AM Tac Tacelosky [email protected] wrote:

Yeah, you're right -- cut and paste was wrong. Sigh.

On Mon, Dec 3, 2018 at 10:05 AM Peter Gribanov [email protected] wrote:

@tacman https://github.com/tacman this code in your PR is not working

use Javer\SphinxBundle\Sphinx\Manager;use Knp\Component\Pager\Pagination\PaginationInterface;use Doctrine\ORM\EntityManagerInterface; public function __construct(EntityManagerInterface $em, PaginatorInterface $paginator, Manager $sphinx) private $sphinx; private $em; private $paginator; { $this->sphinx = $sphinx; $this->em = $em; $this->paginator = $paginator; }

Do you declare the global function __construct()? Maybe this is a class code? Why do you declare properties in the middle of a function/method declaration?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/javer/JaverSphinxBundle/pull/3#issuecomment-443741737, or mute the thread https://github.com/notifications/unsubscribe-auth/AAl0Qcz1zsOWmr_1BTDp4OdAhAeVpusOks5u1T3TgaJpZM4Y-Yfn .

tacman avatar Dec 03 '18 16:12 tacman