When running tests on ezpublish-kernel with Twig version 2.* installed, there is a wrong error message when one of the tests using FieldRenderingExtensionIntegrationTest:testIntegration could not pass. Instead of correct error explaining what went wrong, the error looks like this:
The example can be seen here: https://travis-ci.org/ezsystems/ezpublish-kernel/jobs/231475923. This is also where I discovered the bug.
The bug comes from the fact that function Twig_Loader_Chain::getSource() was deprecated in Twig version 1.27 and removed in version 2.0 in favor of Twig_Loader_Chain::getSourceContext(). Current usage of this function can be found here: https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/MVC/Symfony/Templating/Tests/Twig/Extension/FileSystemTwigIntegrationTestCase.php#L127.