Symfony - FatalThrowableError
Bonjour j'utilise Symfony2.8 avec la version 7 de PHP. J'ai généré la classe 'Class' avec le générateur d'entités de Symfony. Voici le code de la classe Class :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
| <?php
namespace Orion\PlanAppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Class
*
* @ORM\Table(name="pa_class")
* @ORM\Entity(repositoryClass="Orion\PlanAppBundle\Repository\ClassRepository")
*/
class Class
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="code", type="string", length=255)
*/
private $code;
/**
* @var int
*
* @ORM\Column(name="numberOfStudent", type="integer")
*/
private $numberOfStudent;
/**
* @ORM\ManyToOne(targetEntity="Orion\PlanAppBundle\Entity\Sector")
* @ORM\JoinColumn(nullable=false)
*/
private $sector;
/**
* @ORM\ManyToOne(targetEntity="Orion\PlanAppBundle\Entity\Level")
* @ORM\JoinColumn(nullable=false)
*/
private $level;
/**
* @ORM\ManyToOne(targetEntity="Orion\PlanAppBundle\Entity\Time")
* @ORM\JoinColumn(nullable=false)
*/
private $time;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set code
*
* @param string $code
* @return Class
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code
*
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* Set numberOfStudent
*
* @param integer $numberOfStudent
* @return Class
*/
public function setNumberOfStudent($numberOfStudent)
{
$this->numberOfStudent = $numberOfStudent;
return $this;
}
/**
* Get numberOfStudent
*
* @return integer
*/
public function getNumberOfStudent()
{
return $this->numberOfStudent;
}
} |
Quand je lance la commande php app/console doctrine:schema:update --dump-sql j'ai l'erreur :
Code:
1 2
| [Symfony\Component\Debug\Exception\FatalThrowableError]
Parse error: syntax error, unexpected 'Class' (T_CLASS), expecting identifier (T_STRING) |
Je ne comprends pas ce qui se passe, quelqu'un pourrait m'aider please.