Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Symfony Blog:
How to solve PHPUnit issues in Symfony 3.2 applications
Dec 14, 2016 @ 17:53:49

On the Symfony blog there's a quick post sharing helpful advice about fixing PHPUnit tests in Symfony 3.2 applications, mostly around an issue involving the use of the "phar" distribution and a class constant error.

If your application uses Symfony 3.2 and you execute PHPUnit via its PHAR file, you'll end up with the following error message [about the "PARSE_CONSTANT" constant]. In Symfony 3.2 applications you can't use the PHAR file of PHPUnit and you must use instead the PHPUnit Bridge.

They provide the commands to get this bridge installed (via Composer) and how to execute the PHPUnit tests post-install (using the "simple-phpunit" command instead). They explain why this process needs to be followed to run the tests correctly and how the PHPUnit-bridge package helps to resolve the situation.

tagged: phpunit issue symfony v32 bridge constant error

Link: http://symfony.com/blog/how-to-solve-phpunit-issues-in-symfony-3-2-applications


Trending Topics: