Closed jkabat closed 3 years ago
Tests are passing with PHPUnit v5, but require to bump lowest PHP version to 5.6.
Hey @jkabat
Thanks for your work. Currently I'm quite busy, but I try to give you ASAP feedback.
Can you adjust the .travis.yml and remove 5.3 and 5.4 as supported PHP-versions? So I can create a new major release which breaks the support for PHP 5.3/5.4
@xyNNN yes, I can do that.
Thanks! I've branched the current master to 2.0
to support the 2.x versions and will create a new release 3.0 on the new master after merged it!
@xyNNN thank you
I have added lowest constraint for the Twig1 which supported Twig namespaces and tests with prefer-lowest are green.
However mocking a Twig3 Environment class fails, because there are expected strict return types. I suspect PHPUnit 4 does not have support for it. Updating PHPUnit brought much more errors.
Fatal error: Declaration of Mock_Environment_60dc042d::getTemplateClass(string $name, ?int $index = NULL) must be compatible with Twig\Environment::getTemplateClass(string $name, ?int $index = NULL): string in /src/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php(290) : eval()'d code on line 253
@xyNNN what do you suggest here?