Make Twig Bridge compatible with Twig 3.0#236
Make Twig Bridge compatible with Twig 3.0#236florianeckerstorfer merged 2 commits intococur:masterfrom
Conversation
composer.json
Outdated
| "zendframework/zend-view": "~2.2" | ||
| }, | ||
| "conflict": { | ||
| "twig/twig": "<1.38.1||<2.12.1" |
There was a problem hiding this comment.
This ensures that the library is not installed along with an incompatible Twig version.
0353310 to
ec55ba1
Compare
| * @license http://www.opensource.org/licenses/MIT The MIT License | ||
| */ | ||
| class SlugifyExtension extends \Twig_Extension | ||
| class SlugifyExtension extends AbstractExtension |
There was a problem hiding this comment.
The non-namespaced classes were removed in 3.0
68df2ea to
782bc49
Compare
|
Awesome, could you update the PR with the latest changes from |
9be1983 to
e76d76d
Compare
|
@florianeckerstorfer rebased, but the build is failing for <PHP7.0 probably because of the Either the |
|
@mhujer the conflict you have added -
We can go 2 ways:
|
Twig provides namespaced class aliases since 1.38.1 and 2.12.1, so this should work on all recently released Twig versions.
Silex is deprecated anyway.
0340ef8 to
fbabff8
Compare
|
@kubawerlos thanks for pointing that out! I didn't occur to me before. I fixed it by specifying the ranges with lower band: "conflict": {
"twig/twig": ">=1,<1.38.1|>=2,<2.12.1"
},(got inspiration from https://github.com/Roave/SecurityAdvisories/blob/master/composer.json - they have quite a few conflict rules there). |
|
I have absolutely no knowledge about the conflict rules in Composer, @kubawerlos do you think this is fine now? |
|
@florianeckerstorfer looks fine |
Twig provides namespaced class aliases since 1.38.1 and 2.12.1, so this should work on all recently released Twig versions.