Reputation: 1435
I have installed fresh laravel project 5.6 version. On composer.json I have phpunit version 7. But when i run phpunit, it gives me an error of parse synax error. I have php version 7.2. I have also tried doing phpunit --version on /vendor/bin but it is stil giving me
phpunit --version
PHPUnit 3.7.21 by Sebastian Bergmann.
Upvotes: 0
Views: 192
Reputation: 1435
This happened because of you old version of php. This error was meant for php version 5. Even if you are testing, it shows php 7. Somewhere phpunit is executing with your php version 5. In windows, search for environment variables on the bottom right. click on env variables then click on paths. Remove the path that ends with php only. Then try it again.
Upvotes: 1