8000 feature #20072 [FrameworkBundle] removed the Templating component dep… · symfony/symfony@0e4523f · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e4523f

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 828570d + b3de62f commit 0e4523f

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

UPGRADE-3.2.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ UPGRADE FROM 3.1 to 3.2
44
FrameworkBundle
55
---------------
66

7+
* The `symfony/templating` dependency has been removed; require it via `composer
8+
require symfony/templating` if you depend on it and don't already depend on
9+
`symfony/symfony`
710
* The `symfony/translation` dependency has been removed; require it via `composer
811
require symfony/translation` if you depend on it and don't already depend on
912
`symfony/symfony`

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

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

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