/login にアクセスしてログイン画面を表示しようとした際に次のようなエラーメッセージが表示されてしまいます。
You have requested a non-existent service "security.authentication_utils".
php
1<?php 2namespace App\ExampleBundle\Controller; 3 4use Symfony\Bundle\FrameworkBundle\Controller\Controller; 5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; 6use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; 7 8class SecurityController extends Controller 9{ 10 /** 11 * @Route("/login", name="login") 12 * @Template() 13 */ 14 public function loginAction() 15 { 16 $helper = $this->get('security.authentication_utils'); 17 18 return array( 19 'last_username' => $helper->getLastUsername(), 20 'error' => $helper->getLastAuthenticationError(), 21 ); 22 } 23} 24
エラーについて調べたのですが何が原因でこのエラーが表示されているのか、分からない状態です。
エラーについて何か考えられることがありましたらコメントお願いします。
◯開発環境
OS: Windows10
PHP: 5.5.30
Oracle: 11g
Symfony: 2.8.1
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/01/06 06:48 編集