From b3de62f0b3369442a48ab73b157bb09148b8dcfa Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 28 Sep 2016 08:50:27 -0700 Subject: [PATCH] [FrameworkBundle] removed the Templating component dependency on FrameworkBundle --- UPGRADE-3.2.md | 3 +++ src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md | 1 + .../DependencyInjection/FrameworkExtension.php | 4 ++++ src/Symfony/Bundle/FrameworkBundle/composer.json | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/UPGRADE-3.2.md b/UPGRADE-3.2.md index d3488ce0d3..5484cf8e1a 100644 --- a/UPGRADE-3.2.md +++ b/UPGRADE-3.2.md @@ -4,6 +4,9 @@ UPGRADE FROM 3.1 to 3.2 FrameworkBundle --------------- + * The `symfony/templating` dependency has been removed; require it via `composer + require symfony/templating` if you depend on it and don't already depend on + `symfony/symfony` * The `symfony/asset` dependency has been removed; require it via `composer require symfony/asset` if you depend on it and don't already depend on `symfony/symfony` diff --git a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md index ec9447cf4a..f5264732d3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG 3.2.0 ----- + * Removed `symfony/templating` from the list of required dependencies in `composer.json` * Removed `symfony/asset` from the list of required dependencies in `composer.json` * The `Resources/public/images/*` files have been removed. * The `Resources/public/css/*.css` files have been removed (they are now inlined in TwigBundle). diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 00714cbc96..a1fbf0b585 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -142,6 +142,10 @@ class FrameworkExtension extends Extension } if ($this->isConfigEnabled($container, $config['templating'])) { + if (!class_exists('Symfony\Component\Templating\PhpEngine')) { + throw new LogicException('Templating support cannot be enabled as the Templating component is not installed.'); + } + $this->registerTemplatingConfiguration($config['templating'], $container, $loader); } diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index c461e975b9..075c4ade03 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -31,7 +31,6 @@ "symfony/security-core": "~3.2", "symfony/security-csrf": "~2.8|~3.0", "symfony/stopwatch": "~2.8|~3.0", - "symfony/templating": "~2.8|~3.0", "symfony/translation": "~2.8|~3.0", "doctrine/cache": "~1.0", "doctrine/annotations": "~1.0" @@ -48,6 +47,7 @@ "symfony/expression-language": "~2.8|~3.0", "symfony/process": "~2.8|~3.0", "symfony/serializer": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", "symfony/validator": "~3.2", "symfony/yaml": "~3.2", "symfony/property-info": "~2.8|~3.0",