EDIT: This will work for v2.x Behat. For v> 3.x see Alexander Haas answer below.
Finally found! Delving into the code, I found that Behat has a way to change the level of error reporting. Just do
define('BEHAT_ERROR_REPORTING', E_ERROR | E_WARNING | E_PARSE);
in the FeatureContext.php file. This is a trick!
Then I googled the constant and found this in changelog :
- Added constant BEHAT_ERROR_REPORTING to change the level of error
source share