![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 677 Pomógł: 11 Dołączył: 18.11.2009 Ostrzeżenie: (0%) ![]() ![]() |
Dlaczego może wyskakiwać mi taki komunikat:
alias Sensio\Bundle\FrameworkExtraBundle\Configuration\Route is never used przez ten błąd nie mogę z automatu podpinać namespace bo nie widzi w komentarzu @Route, doczytałem że plugin symfony naprawia problem a tu ciągle to samo ;. Kod <?php
namespace AppBundle\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; class DefaultController extends Controller { /** * @Route("/", name="homepage") * @param Request $request * @return \Symfony\Component\HttpFoundation\Response */ public function indexAction(Request $request) { // replace this example code with whatever you need return $this->render('default/index.html.twig', [ 'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..'), ]); } } |
|
|
![]() |
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 1 270 Pomógł: 184 Dołączył: 7.10.2012 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
http://stackoverflow.com/questions/2726447...atements-in-php jest tak ż w PHP stron musisz zainstalować plugin lub użyć tej przestrzeni nazw zamiast @Route
Ten post edytował rad11 3.03.2016, 21:53:12 |
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarejestrowani Postów: 3 034 Pomógł: 366 Dołączył: 24.05.2012 Ostrzeżenie: (0%) ![]() ![]() |
o PHP Annotations jest napisane w opisie pluginu do Symfony
![]() |
|
|
![]() ![]() |
![]() |
Aktualny czas: 20.08.2025 - 16:46 |