Skip to content

Commit 55e2d7e

Browse files
committed
feature #20072 [FrameworkBundle] removed the Templating component dependency on FrameworkBundle (fabpot)
This PR was merged into the 3.2-dev branch. Discussion ---------- [FrameworkBundle] removed the Templating component dependency on FrameworkBundle | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no (except for people using FrameworkBundle without requiring symfony/symfony which should be pretty rare; and fixing this is easy by adding symfony/templating explicitly) | Deprecations? | no | Tests pass? | yes | Fixed tickets | #15748 partially | License | MIT | Doc PR | n/a Another PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Templating component from the list. I made most of the work in previous version, so this change is really just about adding a good error message when templating is not enabled. For the record, this is also in the path of making possible to use Symfony with Twig without using the Templating component indirection (I think that this is in fact the last step). Commits ------- b3de62f [FrameworkBundle] removed the Templating component dependency on FrameworkBundle
2 parents a1382b4 + 2ddbd43 commit 55e2d7e

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
3.2.0
55
-----
66

7+
* Removed `symfony/templating` from the list of required dependencies in `composer.json`
78
* Removed `symfony/translation` from the list of required dependencies in `composer.json`
89
* Removed `symfony/asset` from the list of required dependencies in `composer.json`
910
* The `Resources/public/images/*` files have been removed.

DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ public function load(array $configs, ContainerBuilder $container)
148148
}
149149

150150
if ($this->isConfigEnabled($container, $config['templating'])) {
151+
if (!class_exists('Symfony\Component\Templating\PhpEngine')) {
152+
throw new LogicException('Templating support cannot be enabled as the Templating component is not installed.');
153+
}
154+
151155
$this->registerTemplatingConfiguration($config['templating'], $container, $loader);
152156
}
153157

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"symfony/security-core": "~3.2",
3232
"symfony/security-csrf": "~2.8|~3.0",
3333
"symfony/stopwatch": "~2.8|~3.0",
34-
"symfony/templating": "~2.8|~3.0",
3534
"doctrine/cache": "~1.0",
3635
"doctrine/annotations": "~1.0"
3736
},
@@ -48,6 +47,7 @@
4847
"symfony/process": "~2.8|~3.0",
4948
"symfony/serializer": "~2.8|~3.0",
5049
"symfony/translation": "~2.8|~3.0",
50+
"symfony/templating": "~2.8|~3.0",
5151
"symfony/validator": "~3.2",
5252
"symfony/yaml": "~3.2",
5353
"symfony/property-info": "~2.8|~3.0",

0 commit comments

Comments
 (0)