I'm working with symfony2 and I'm using Doctrine to create entities from an existing Database. It seems like everything goes fine except this Syntax Error:
syntax error, unexpected 'function', expecting 'identifier'
I've been searching for a solution and it seems most of the time a typo is the cause. But this code is all being generated by Doctrine and I'm not seeing any typo's ... Here is the class where the error is showing up, specifically at 'Class Function':
<?php
namespace IntoPeople\DatabaseBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Function
*
* @ORM\Table(name="Function")
* @ORM\Entity
*/
class Function
{
/**
* @var string
*
* @ORM\Column(name="Name", type="string", length=250, nullable=false)
*/
private $name;
/**
* @var integer
*
* @ORM\Column(name="Id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
}