Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [inne]PHP Storm is never used
Forum PHP.pl > Forum > Przedszkole
Randallmaster
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').'/..'),
        ]);
    }
}
rad11
http://stackoverflow.com/questions/2726447...atements-in-php jest tak ż w PHP stron musisz zainstalować plugin lub użyć tej przestrzeni nazw zamiast @Route
com
o PHP Annotations jest napisane w opisie pluginu do Symfony tongue.gif
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.