0

Catching an error with Symfony 3, php 7.1.2 just after installation:

Parse error: syntax error, unexpected '[', expecting ')' in Z:\home\symf.loc\www\try01\app\autoload.php on line 9

The file autoload.php:

<?php

use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;

/** @var ClassLoader $loader */
$loader = require __DIR__.'/../vendor/autoload.php';

AnnotationRegistry::registerLoader([$loader, 'loadClass']);

return $loader;

Any ideas what to do ?

Thomas Rollet
  • 1,573
  • 4
  • 19
  • 33
AndreyPanferov
  • 103
  • 1
  • 9

0 Answers0