Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Twig 2.7 namespaces #1061

Merged
merged 3 commits into from
Apr 21, 2019
Merged

use Twig 2.7 namespaces #1061

merged 3 commits into from
Apr 21, 2019

Conversation

IonBazan
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
Doc updated no
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT

Twig 2.7 moved to namespaced classes instead of old pre-PHP5.3 ones.

@IonBazan
Copy link
Contributor Author

I think there is a problem with Travis-CI config - the test is shown as passed, but it contains errors: https://travis-ci.org/schmittjoh/serializer/jobs/506178733. Although, it's not caused by this PR.

@goetas
Copy link
Collaborator

goetas commented Mar 15, 2019

Hi, Thanks for the PR.

Currently I think that is not a good idea to drop Twig 1.x and <2.7 support. C

Can this changes be done in a backward compatible way, preferring the new class names if they are available, and falling back on the old if they are not available?

@enumag
Copy link
Contributor

enumag commented Mar 20, 2019

This doesn't necessarily break compatibility with all versions <2.7. Namespaced aliases existed several versions before that, 2.7 only added the deprecation of non-namespaced types.

Btw. not supporting Twig 2.7 is quite a problem now because roave/security-advisories no longer allows Twig 2.0-2.6 because of this vulnerability.

rgomezcasas added a commit to CodelyTV/php-ddd-example that referenced this pull request Mar 25, 2019
Until schmittjoh/serializer#1061 gets merged
Because there is a compatibility issue with a deprecated twig version
rgomezcasas added a commit to CodelyTV/php-ddd-example that referenced this pull request Mar 25, 2019
Until schmittjoh/serializer#1061 gets merged
Because there is a compatibility issue with a deprecated twig version
rgomezcasas added a commit to CodelyTV/php-ddd-example that referenced this pull request Mar 25, 2019
Until schmittjoh/serializer#1061 gets merged
Because there is a compatibility issue with a deprecated twig version
@mbabker
Copy link
Contributor

mbabker commented Apr 17, 2019

Can this changes be done in a backward compatible way, preferring the new class names if they are available, and falling back on the old if they are not available?

If the version constraint is set to ~1.34|~2.4 then you're OK, those were the two releases where the namespaced aliases were introduced.

@goetas
Copy link
Collaborator

goetas commented Apr 17, 2019

Having ~1.34|~2.4 is ok for me

@goetas goetas merged commit 8026e13 into schmittjoh:master Apr 21, 2019
@goetas
Copy link
Collaborator

goetas commented Apr 21, 2019

Thanks!

@IonBazan IonBazan deleted the twig-2.7 branch July 25, 2019 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants