0

Good afternoon,

I'm working on a symfony project and everything was going well until I received the following messages :

PHP Warning: Unsupported declare 'strict_types' in .../vendor/ocramius/proxy-manager/src/ProxyManager/Configuration.php on line 19

PHP Parse error: parse error, expecting ';'' or '{'' in .../vendor/ocramius/proxy-manager/src/ProxyManager/Configuration.php on line 97

These 2 messages appear whenever I try to use the command line in symfony.

I tried the following commands:

php app/console generate:doctrine:entity 

and

php app/console cache:clear --env=prod.

I also tried to use php bin/console instead of app/console as I'm aware the new symfony versions use php bin/console.

I'm using Mamp with php version 7.1 and Symfony version 2.8 for the projects.

Thanks for your help!

2
  • 1
    strict_types for declare added in php7. Make sure your php version is 7. Commented Apr 12, 2017 at 19:31
  • yes my php version is 7.1.1. When I try to use the commands in another symfony project I have, it works fine. Only this projects seems to have issues. Commented Apr 12, 2017 at 19:36

1 Answer 1

1

If someone runs into this issue it means that your php version is not 7.0 The issue I had was that the Mamp version was 7.1.1 and the symfony project was also running on 7.1.1 in the browser but when I checked the php version in the bash commands, it was 5.6 so make sure you're bash commands use php 7.0 instead of 5.6

Sign up to request clarification or add additional context in comments.

1 Comment

hi, if I want to resolve this issue on php 7 below versions ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.