10000 minor #32654 Clarify deprecations for framework.templating (linaori) · mkrauser/symfony@e2a2dd9 · GitHub
[go: up one dir, main page]

Skip to content

Commit e2a2dd9

Browse files
committed
minor symfony#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 ------- 1727923 Clarify deprecations for framework.templating
2 parents 3e8eaeb + 1727923 commit e2a2dd9

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

UPGRADE-4.3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Form
7777
FrameworkBundle
7878
---------------
7979

80-
* Deprecated the `framework.templating` option, use Twig instead.
80+
* Deprecated the `framework.templating` option, configure the Twig bundle instead.
8181
* Not passing the project directory to the constructor of the `AssetsInstallCommand` is deprecated. This argument will
8282
be mandatory in 5.0.
8383
* Deprecated the "Psr\SimpleCache\CacheInterface" / "cache.app.simple" service, use "Symfony\Contracts\Cache\CacheInterface" / "cache.app" instead.

UPGRADE-5.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Form
169169
FrameworkBundle
170170
---------------
171171

172-
* Removed the `framework.templating` option, use Twig instead.
172+
* Removed the `framework.templating` option, configure the Twig bundle instead.
173173
* The project dir argument of the constructor of `AssetsInstallCommand` is required.
174174
* Removed support for `bundle:controller:action` syntax to reference controllers. Use `serviceOrFqcn::method`
175175
instead where `serviceOrFqcn` is either the service ID when using controllers as services or the FQCN of the controller.

src/Symfony/Bundle/FrameworkBundle/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

src/Symfony/Bundle/FrameworkBundle/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)
0