-
Notifications
You must be signed in to change notification settings - Fork 179
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
Remove templating dependency #213
Remove templating dependency #213
Conversation
28c91a7
to
861c229
Compare
Generating json with a template engine seems weired alltogether. in particular: |
I know that symfony wanted to use Twig by default because of the speed. @stof can you confirm this? Is it a good practice to replace the template engine for twig for speed? |
Yep, using Twig directly instead of the whole templating component is probably a small optimization in terms of speed because of the many classes avoided. |
composer.json
Outdated
"symfony/templating": "~2.7|~3.1", | ||
"symfony/translation": "~2.7|~3.1" | ||
"symfony/translation": "~2.7|~3.1", | ||
"twig/twig": "~1.0|~2.0" |
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.
I suggesting depending on TwigBundle instead (as this bundle actually depends on services defined in the bundle, not just on Twig)
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.
Done 👍
@monteiro the big benefit of this PR is indeed compatibility with Symfony 4, where the templating component would not be part of projects by default anymore (users would have to require it explicitly if they want to use it) |
0244e30
to
9286058
Compare
@stof thanks for the clarification. |
@pyrech let me see what is happening with the tests, since in master they failed as well. |
@pyrech can you plz rebase with master so we can have the tests green? Thanks! |
9286058
to
f1e4245
Compare
Done 😉 |
@pyrech it seems that the tests are failing for PHP 5.3 😞 Since in master passes, is it a problem with this PR? |
Hum, looks like a problem with translation ordering but no idea where could it come from 😕 |
@pyrech tested locally with php5.3 and it worked 😢 travis not. |
@pyrech can you rebase with master. I have dropped php 5.3 support in travis. |
f1e4245
to
8cd0636
Compare
Done, sorry for the delay |
@pyrech thanks! |
This PR removes the dependency on symfony/templating component and uses Twig directly
Ref #200