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 #644

Open
tobotomas opened this issue Dec 21, 2020 · 5 comments
Open

Syntax error #644

tobotomas opened this issue Dec 21, 2020 · 5 comments
Labels

Comments

@tobotomas
Copy link

Hi I have error:
syntax error, unexpected '?', expecting function (T_FUNCTION) or const (T_CONST) in /home/www/tre.cz/www/kalendar-api.tre.cz/vendor/ocramius/proxy-manager/src/ProxyManager/Configuration.php (line 30)

In my composer.json I have
"require": { "php": ">=7.2.5", "doctrine/doctrine-bundle": "^2.1", "doctrine/doctrine-fixtures-bundle": "^3.4", "doctrine/doctrine-migrations-bundle": "^3.0", "doctrine/orm": "^2.7", "ocramius/proxy-manager": "2.1.0",

Running on php 7.3

@Ocramius
Copy link
Owner

Are you sure about the ocramius/proxy-manager version?

Try composer list --installed and check the exact versions: fairly sure you are running something newer than you should.

@tobotomas
Copy link
Author

There I can see

ocramius/proxy-manager 2.2.3

but this should be ok with php 7.3 right?

@Ocramius
Copy link
Owner

Yes, should be alright:

"php": "^7.2.0",

Do the contents of your Configuration.php match https://github.com/Ocramius/ProxyManager/blob/4d154742e31c35137d5374c998e8f86b54db2e2f/src/ProxyManager/Configuration.php ?

Sounds like something went sideways during installation...

@tobotomas
Copy link
Author

Thanks, it is weird. When I replace full code in file it is working. Problem is since Github set new PHP 8.0.0 and I had to set php version in pipeline. When I compare this two files there is no difference.

@Ocramius
Copy link
Owner

Two things to check:

  1. Your CLI and PHP-FPM versions may be differing
  2. Check that installation is respecting your committed composer.lock

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

No branches or pull requests

2 participants