あなたは合成サービス(「要請」)を要求している。 DICはこのサービスの構築方法を知らない。合成サービスをリクエストしました(リクエスト)。 DICはこのサービスの構築方法を知らない。
composer.jsonで「knplabs/knp-paginator-bundle」:「〜2.5.3」を追加して更新を実行した後にエラーが発生しました。
public function listingAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
$list = $em->getRepository('Avtostil\SharedBundle\Entity\Gallery')->findAll();
$paginator = $this->get('knp_paginator');
$pagination = $paginator->paginate($list, $request->query->getInt('page', 1)/* page number */, 3/* limit per page */);
$pagination->setUsedRoute(\Avtostil\SharedBundle\Entity\Page::GALLERY_LISTING); /* QUICK AND DIRTY */
$data = [];
$data['galleries'] = $pagination;
echo "<pre>";
\Doctrine\Common\Util\Debug::dump('here');
die();
return $this->render('AvtostilOpenBundle:Gallery:listing.html.twig', $data);
}
エラーのハッピングを削除すると、ダンプは正常ですか?
in appDevDebugProjectContainer.php line 4094
at appDevDebugProjectContainer->getRequestService() in bootstrap.php.cache line 2189
at Container->get('request', '2') in appDevDebugProjectContainer.php line 7503
at appDevDebugProjectContainer->synchronizeRequestService() in bootstrap.php.cache line 2125
at Container->set('request', null, 'request') in bootstrap.php.cache line 3278
at ContainerAwareHttpKernel->handle(object(Request), '1', true) in bootstrap.php.cache line 2479
at Kernel->handle(object(Request)) in app_dev.php line 29
Symfonyの最後のバージョンと関連していると思いますが、私は2.8.10では同じ問題を抱えていますが、2.8.9ではありません。それがあなたのために同じであるかどうか教えてください。 – COil
"name": "symfony/symfony"、 "version": "v2.7.17"、 –
このバージョンで同じ問題があると思いますが、2.7.16で試してみませんか? – COil