This is a strange one, I have never come across it before - but then I've not used Symfony 3.1, only 2.8.
When I run a console command such as clear:cache
or a doctrine:schema:update
, I get the following error on terminal:
PHP Parse error: syntax error, unexpected '[', expecting ')' in /var/www/vhosts/mycrmsitetest.co.uk/httpdocs/bin/console on line 20
The line its referring to in the console file is:
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
This is exactly the same as on my local drive, but it works there - it's only when it's on the server that this fails.
Does anyone know what this may be?