Skip to content

Commit f4c4d29

Browse files
committed
minor #32654 Clarify deprecations for framework.templating (linaori)
This PR was merged into the 4.3 branch. Discussion ---------- Clarify deprecations for framework.templating | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ After updating to 4.3 I started receiving a bunch of deprecations: - `Enabling the Templating component is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.` - `The "templating.cache_warmer.template_paths" service is deprecated since Symfony 4.3 and will be removed in 5.0.` - `The Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplatePathsCacheWarmer class is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.` - `The "templating.finder" service is deprecated since Symfony 4.3 and will be removed in 5.0.` - `The "templating.locator" service is deprecated since Symfony 4.3 and will be removed in 5.0.` The main gist here was _"use Twig instead"_, which I'm already doing. Hopefully the changed messages in the upgrade guides/config should guide developers to the solution, as it seems to be as simple as removing the config to prevent all these deprecations from triggering. After removing the templating config, it fixed all these deprecations for me without breaking anything else (from what I could tell). Commits ------- 1727923086 Clarify deprecations for framework.templating
2 parents f3f313a + cfab274 commit f4c4d29

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CHANGELOG
44
4.3.0
55
-----
66

7-
* Deprecated the `framework.templating` option, use Twig instead.
7+
* Deprecated the `framework.templating` option, configure the Twig bundle instead.
88
* Added `WebTestAssertionsTrait` (included by default in `WebTestCase`)
99
* Renamed `Client` to `KernelBrowser`
1010
* Not passing the project directory to the constructor of the `AssetsInstallCommand` is deprecated. This argument will

DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ private function addTemplatingSection(ArrayNodeDefinition $rootNode)
608608
->arrayNode('templating')
609609
->info('templating configuration')
610610
->canBeEnabled()
611-
->setDeprecated('The "%path%.%node%" configuration is deprecated since Symfony 4.3. Use the "twig" service directly instead.')
611+
->setDeprecated('The "%path%.%node%" configuration is deprecated since Symfony 4.3. Configure the "twig" section provided by the Twig Bundle instead.')
612612
->beforeNormalization()
613613
->ifTrue(function ($v) { return false === $v || \is_array($v) && false === $v['enabled']; })
614614
->then(function () { return ['enabled' => false, 'engines' => false]; })

0 commit comments

Comments
 (0)