xyNNN / GoogleTagManagerBundle

Google Tag Manager Bundle for Symfony 2
https://github.com/xyNNN/GoogleTagManagerBundle
GNU Lesser General Public License v3.0
27 stars 15 forks source link

Allow Twig v3 #40

Closed jkabat closed 3 years ago

jkabat commented 3 years ago

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?

jkabat commented 3 years ago

Tests are passing with PHPUnit v5, but require to bump lowest PHP version to 5.6.

xyNNN commented 3 years ago

Hey @jkabat

Thanks for your work. Currently I'm quite busy, but I try to give you ASAP feedback.

xyNNN commented 3 years ago

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

jkabat commented 3 years ago

@xyNNN yes, I can do that.

xyNNN commented 3 years ago

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 commented 3 years ago

@jkabat See https://packagist.org/packages/xynnn/google-tag-manager-bundle#3.0

jkabat commented 3 years ago

@xyNNN thank you