Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Deprecate the Templating component integration#21035
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
stof commentedDec 23, 2016
you also need to deprecate the TwigEngine (in the bridge and the bundle), as they are about integrating Twig in this component. |
stof commentedDec 23, 2016
And this requires deprecating the |
dunglas commentedDec 23, 2016
Do we want to deprecate this syntax or not? |
stof commentedDec 23, 2016
Well, if we don't want to deprecate it, you need to undeprecate the TemplateNameParser system in your PR. |
mvrhov commentedDec 23, 2016
The |
dunglas commentedDec 23, 2016
So let's deprecate this notation. |
javiereguiluz commentedDec 23, 2016
dunglas commentedDec 23, 2016
@javiereguiluz but we have an advantage this time, people already using Twig alone (without the templating bridge) can only use the |
fabpot commentedDec 23, 2016
Indeed,#11051 is very different. Here we are deprecatingeverything related to the Templating component, including the way we reference templates. There is no need to discuss how to reference templates as we are just using "pure" Twig, nothing more. |
xabbuh commentedDec 23, 2016
But I think we should indeed look into#20130 and try to find a way to resolve the inconsistency if we force everyone to use the Twig schema to reference templates. |
xabbuh commentedDec 28, 2016
84512fd to942e80bComparechalasr commentedJan 13, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Should the TemplatingPass be deprecated? |
942e80b tob4c2b91Comparedunglas commentedJan 28, 2017
@chalasr good catch, done. |
ac6ec3b to3320f5fCompare| if ($container->hasDefinition('templating.engine.php')) { | ||
| $helpers =array(); | ||
| foreach ($container->findTaggedServiceIds('templating.helper')as$id =>$attributes) { | ||
| @trigger_error('The'.self::class.' class is deprecated since version 3.3 and will be removed in 4.0. Use Twig instead.',E_USER_DEPRECATED); |
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.
Wouldn't it be even better to have this deprecation only when using the class itself and trigger something likeThe "templating.helper" tag is deprecated as of 3.3... here instead?
c03495c to1086047Compare| * | ||
| * @author Fabien Potencier <fabien@symfony.com> | ||
| * | ||
| * @deprecated The TwigEngine class will be removed in Symfony 4.0. You should use \Twig_Environment directly instead. |
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.
@deprecated since version 3.3, to be removed in 4.0. Use Twig instead. (same below)
b0ef3c6 to245ffd0Compareadrienrn commentedFeb 24, 2017
One question remains on my end : templating was giving a layer of abstraction to twig and if |
nicolas-grekas commentedMar 6, 2017
Status: needs work |
248a9c0 to71683bdCompare9c96d27 to715b7d9Compare715b7d9 to7169f4dComparefabpot commentedMar 19, 2019
Thank you@dunglas. |
…ntegration (dunglas, fabpot)This PR was merged into the 4.3-dev branch.Discussion----------[FrameworkBundle] Deprecate the Templating component integration| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | yes| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | n/aThis PR deprecates the Templating component integration in FrameworkBundle. Only a few people use it because almost everybody use Twig or the serializer to output data. Removing this component will facilitate the maintenance.Commits-------7169f4d [Templating] added more deprecation224c891 [FrameworkBundle] Deprecate the Templating component integration
dunglas commentedMar 19, 2019
Thanks for finishing this! |
javiereguiluz commentedMar 27, 2019
I'm trying to make the doc changes for this. I have two questions:
# config/packages/framework.yamlframework:# ...templating:hinclude_default_template:hinclude.html.twig Thanks! |
fabpot commentedMar 29, 2019
To answer your questions (and this is just my point of view):
|
…javiereguiluz)This PR was squashed before being merged into the master branch (closes#11231).Discussion----------Documented the deprecation of the Templating componentDocumentssymfony/symfony#21035 but there are some things I'm not sure about. Please, review.Commits-------57fadaf Documented the deprecation of the Templating component
… for PHP templating layer (yceruto)This PR was merged into the 4.4 branch.Discussion----------[FrameworkBundle][TwigBundle] Add missing deprecations for PHP templating layer| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | yes| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -As part of#21035 and7169f4dCommits-------61613d0 Add missing deprecations for PHP templating layer
… for PHP templating layer (yceruto)This PR was merged into the 4.4 branch.Discussion----------[FrameworkBundle][TwigBundle] Add missing deprecations for PHP templating layer| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | yes| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -As part ofsymfony/symfony#21035 andsymfony/symfony@7169f4dCommits-------61613d0bf0 Add missing deprecations for PHP templating layer
This PR was merged into the 5.0-dev branch.Discussion----------Removed support for PHP templating everywhere| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -Ref:#21035 and7169f4d**TODO:**Missing deprecations in 4.4 (#31800): - [x] `Symfony\Bundle\FrameworkBundle\Controller\TemplateController` 2nd argument. - [x] `Symfony\Bundle\TwigBundle\CacheWarmer\TemplateCacheCacheWarmer` class and service.**Labels:** `FrameworkBundle`, `TwigBundle`, `TwigBridge`, `SecurityBundle`, `Form`, `HttpKernel`Friendly ping@fabpot and@dunglasCommits-------d5be373 Removed support for PHP templating everywhere
Uh oh!
There was an error while loading.Please reload this page.
This PR deprecates the Templating component integration in FrameworkBundle. Only a few people use it because almost everybody use Twig or the serializer to output data. Removing this component will facilitate the maintenance.