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

Remove templating dependency #213

Merged
merged 2 commits into from
Sep 20, 2017

Conversation

pyrech
Copy link
Contributor

@pyrech pyrech commented Aug 14, 2017

This PR removes the dependency on symfony/templating component and uses Twig directly
Ref #200

@willdurand willdurand self-requested a review August 14, 2017 09:29
@pyrech pyrech force-pushed the remove-templating-dependency branch 4 times, most recently from 28c91a7 to 861c229 Compare August 14, 2017 12:33
@monteiro
Copy link
Collaborator

monteiro commented Sep 3, 2017

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?

@pyrech
Copy link
Contributor Author

pyrech commented Sep 5, 2017

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.
But at first I opened this PR just because when using Flex, the bundle installation failed and forced me to install and configure the templating component even if not using it in my app

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"
Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

@stof
Copy link
Contributor

stof commented Sep 5, 2017

@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)

@pyrech pyrech force-pushed the remove-templating-dependency branch 3 times, most recently from 0244e30 to 9286058 Compare September 6, 2017 09:35
@monteiro
Copy link
Collaborator

monteiro commented Sep 7, 2017

@stof thanks for the clarification.

@monteiro
Copy link
Collaborator

monteiro commented Sep 7, 2017

@pyrech let me see what is happening with the tests, since in master they failed as well.

@monteiro
Copy link
Collaborator

monteiro commented Sep 7, 2017

@pyrech can you plz rebase with master so we can have the tests green? Thanks!

@pyrech pyrech force-pushed the remove-templating-dependency branch from 9286058 to f1e4245 Compare September 7, 2017 12:48
@pyrech
Copy link
Contributor Author

pyrech commented Sep 7, 2017

Done 😉

@monteiro
Copy link
Collaborator

monteiro commented Sep 7, 2017

@pyrech it seems that the tests are failing for PHP 5.3 😞 Since in master passes, is it a problem with this PR?

@pyrech
Copy link
Contributor Author

pyrech commented Sep 7, 2017

Hum, looks like a problem with translation ordering but no idea where could it come from 😕

@monteiro
Copy link
Collaborator

monteiro commented Sep 8, 2017

@pyrech tested locally with php5.3 and it worked 😢 travis not.

@monteiro
Copy link
Collaborator

monteiro commented Sep 18, 2017

@pyrech can you rebase with master. I have dropped php 5.3 support in travis.

@pyrech
Copy link
Contributor Author

pyrech commented Sep 19, 2017

Done, sorry for the delay

@monteiro
Copy link
Collaborator

@pyrech thanks!

@monteiro monteiro merged commit 6752e37 into willdurand:master Sep 20, 2017
@pyrech pyrech deleted the remove-templating-dependency branch October 4, 2017 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants