-
Notifications
You must be signed in to change notification settings - Fork 252
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
Make Twig Bridge compatible with Twig 3.0 #236
Make Twig Bridge compatible with Twig 3.0 #236
Conversation
composer.json
Outdated
@@ -38,6 +38,9 @@ | |||
"zendframework/zend-servicemanager": "~2.2", | |||
"zendframework/zend-view": "~2.2" | |||
}, | |||
"conflict": { | |||
"twig/twig": "<1.38.1||<2.12.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ensures that the library is not installed along with an incompatible Twig version.
0353310
to
ec55ba1
Compare
@@ -23,7 +24,7 @@ | |||
* @copyright 2012-2015 Florian Eckerstorfer | |||
* @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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.