Platform icon indicating copy to clipboard operation
Platform copied to clipboard

error in Translator.php file

Open khoant88 opened this issue 7 years ago • 3 comments

Summary of issue

I'm installing cms by docker. When I run ./dcp artisan asgard:install then occur error : In Translator.php line 79:
Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)
How can I fix it?

Steps to reproduce

System Details

  • Operating System : macOS
  • PHP Version :
  • Laravel Version
  • Asgardcms/Platform version

khoant88 avatar Nov 10 '18 01:11 khoant88

There is not enough information here to figure out why you're experiencing that problem. But if I had to guess, it'd be your php version being lower than 7. That is of course assuming that is the case, given you didn't specify what version you have.

Daedalus11069 avatar Dec 03 '18 08:12 Daedalus11069

@Daedalus11069 I am running into the same problem. I see he is using the dcp helper which as far I understand executes commands on the docker container. So he should be using php 7.0.

I followed te documentation, step by step multiple times but I ran into this error every time.

System details

  • operating System : macOs Mojave 10.14.2
  • PHP Version: PHP 7.1.19 (cli) (built: Aug 17 2018 20:10:18) ( NTS ) (local)
  • PHP 7.0 in docker image
  • Asgardcms/Platform version: asgardcms/app:latest

ruudsc avatar Jan 15 '19 13:01 ruudsc

I just ran into the same problem on a new install using the docker-compose that is included in this repo. The ? error, is in the vendor typehinting. This was added in php 7.1, but the container that is included with this repo installed php 7.0 Going to update the version and give it another try.

Can confirm, moving to php 7.2 resolves this issue of the ?

ARH-Digital avatar Apr 14 '19 07:04 ARH-Digital