Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST) #2

Closed
shahabzebare opened this issue Jul 28, 2020 · 6 comments

Comments

@shahabzebare
Copy link

::Composer\Autoload\includeFile
vendor/digital-creative/nova-dashboard/src/NovaDashboard.php:13

@milewski
Copy link
Member

I think this is due to the version of php you are using, what version is it?

@haxifang-aircos
Copy link

I have the same problem. My VERSION of PHP is 7.4.6

@milewski
Copy link
Member

Guys the line in the error is this one https://github.com/dcasia/nova-dashboard/blob/master/src/NovaDashboard.php#L13 are you sure you are using php 7.4? It should support property type hint

@haxifang-aircos
Copy link

I am sure the version is 7.4.6. What version do you have?

@milewski
Copy link
Member

milewski commented Jul 28, 2020

Im currently on: PHP 7.4.8 (cli) (built: Jul 9 2020 23:47:36) ( NTS )

However it should work since PHP 7.4, are you sure that your host machine is using 7.4 but your web server is actually using an older version?

---edit

I have just rebuild my docker images using php:7.4.6-fpm-alpine image and it still works without issues... I do think your webserver is not pointing to the right version of php

@cord
Copy link
Contributor

cord commented Aug 17, 2020

works here with php 7.4.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants