title: Parse Error When Creating Form on Symfony
body: <p>I'm creating a form on Symfony and I'm getting the following error:</p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in C:\wamp\www\estore\src\Estore\AdminBundle\Controller\AdminController.php on line 39.</p>
  </blockquote>
  
  <p>Line 39 is:</p>
  
  <pre><code>-&gt;add('category', TextType::class)
  </code></pre>
  
  <p>Complete code:</p>
  
  <pre><code>namespace Estore\AdminBundle\Controller;
  use Estore\AdminBundle\Entity\Categories;
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  use Symfony\Component\HttpFoundation\Request;
  use Symfony\Component\HttpFoundation\Response;
  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  use Symfony\Component\Form\Extension\Core\Type\TextType;
  use Symfony\Component\Form\Extension\Core\Type\SubmitType;
  
  class AdminController extends Controller
  {
      /**
       * @Route("/admin/index")
       */
      public function indexAction()
      {
          return new Response("Testing Routing on Admin Bundle to go to sleep");
      }
  
  
      /**
       * @Route("/admin/createcategories")
       */
      public function createCategoriesAction(Request $request)
      {
  
          $categories = new Categories();
  
          $form = $this-&gt;createFormBuilder($categories)
                       -&gt;add('category', TextType::class)
                       -&gt;add('description', TextType::class)
                       -&gt;add('save', SubmitType::class, array('label' =&gt; 'Create Category'))
                       -&gt;getForm();
          return $thi-&gt;render('EstoreAdminBundle:Default:create_category.html.twig', array(
              'form' =&gt; $form-&gt;createView(),
          ));
      }
  }
  </code></pre>
  
  <p>Here some part of the Stack Trace information:</p>
  
  <pre><code>Stack Trace
  
  in src\Estore\AdminBundle\Controller\AdminController.php at line 39  -
      $categories = new Categories(); 
      $form = $this-&gt;createFormBuilder($categories) 
                   -&gt;add('category', TextType::class) 
                   -&gt;add('description', TextType::class) 
                   -&gt;add('save', SubmitType::class, array('label' =&gt; 'Create Category')) 
                   -&gt;getForm(); 
  
            at Composer\Autoload\includeFile () 
            in vendor\composer\ClassLoader.php at line 301   
  
            at ClassLoader -&gt;loadClass () 
            at ReflectionClass -&gt;__construct () 
            in vendor\symfony\symfony\src\Symfony\Component\Routing\Loader\AnnotationDirectoryLoader.php at line 52  
  
            at AnnotationDirectoryLoader -&gt;load () 
  </code></pre>
  
  <p>I'm working with a git repository which is checked out from two computers. In one of them I don't have that issue. The difference between them is the computer with above error has PHP version 5.4.26 running on wamp. Symfony version 2.8.4-DEV - app/dev/debug</p>