Class does not exist.Symfony

0

Witam,

Mam taki problem jak w pliku "error-symfony".

Tutaj podaje mój plik Genus.php

 /**
 * Created by PhpStorm.
 * User: pcp
 * Date: 2016-08-13
 * Time: 15:03
 */

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints\DateTime;


/**
 * @ORM\Entity(repositoryClass="AppBundle\Repository\GenusRepository")
 * @ORM\Table(name="genus")
 */
class Genus
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @ORM\Column(type="string")
     */
    private $name;

    /**
     * @ORM\Column(type="integer")
     */
    private $price;

    /**
     * @return mixed
     */
    public function getPrice()
    {
        return $this->price;
    }

    /**
     * @param mixed $price
     */
    public function setPrice($price)
    {
        $this->price = $price;
    }
    /**
     * @ORM\Column(type="string")
     */
    private $subFamily;

    /**
     * @ORM\Column(type="string" ,nullable=true)
     */
    private $funFact;

    /**
     * @ORM\Column(type="string")
     */
    private $speciesCount;

    /**
     * @ORM\Column(type="boolean")
     */
    private $isPublished;

    public function setIsPublished($isPublished){
        $this->isPublished = $isPublished;
    }

    /**
     * @param mixed $id
     */
    public function setId($id)
    {
        $this->id = $id;
    }

    /**
     * @return mixed
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @return mixed
     */

    public function getName()
    {
        return $this->name;
    }

    /**
     * @param mixed $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * @return mixed
     */
    public function getSubFamily()
    {
        return $this->subFamily;
    }

    /**
     * @param mixed $subFamily
     */
    public function setSubFamily($subFamily)
    {
        $this->subFamily = $subFamily;
    }

    /**
     * @return mixed
     */
    public function getFunFact()
    {
        return $this->funFact;
    }

    /**
     * @param mixed $funFact
     */
    public function setFunFact($funFact)
    {
        $this->funFact = $funFact;
    }

    /**
     * @return mixed
     */
    public function getSpeciesCount()
    {
        return $this->speciesCount;
    }

    /**
     * @param mixed $speciesCount
     */
    public function setSpeciesCount($speciesCount)
    {
        $this->speciesCount = $speciesCount;
    }

    public function uppdateAdd(){
        return new \DateTime('-'.rand(1,30).'days');
    }
}

Proszę o pomoc:)
Pozdrawiam :)

0

spróbuj może przeczyścić cache

0

Wyskakuje błąd jak chce to zrobić:) Czy mam manualnie to zrobić przez usunięcie zawartości cache?Tylko nie wiem czy mogę usunąć cały folder cache czy tylko jego zawartość:) żebym nie przedobrzył :)

1

A co pisze na błędzie? :)
Że nie może znaleźć pliku AppBundle\Repository\GenusRepository A jak wiedzę po screenach to repo masz w AppBundle*Controller*\Repository\GenusRepository

Daj folder Repository wyżej, do AppBundle i wtedy sprawdź.

0

Dzięki !!

1 użytkowników online, w tym zalogowanych: 0, gości: 1