From 1c8dc9d06b600571e3ae437059ff13a7d5d3ba05 Mon Sep 17 00:00:00 2001 From: Jules Pietri Date: Thu, 28 Apr 2016 13:31:04 +0200 Subject: [PATCH] [Form] [DoctrineBridge] updated changelogs after #18359 follows #18359. --- UPGRADE-3.1.md | 5 ++++- UPGRADE-4.0.md | 2 ++ src/Symfony/Bridge/Doctrine/CHANGELOG.md | 2 ++ .../Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php | 6 ------ src/Symfony/Component/Form/CHANGELOG.md | 1 + 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/UPGRADE-3.1.md b/UPGRADE-3.1.md index 95b53598a8ae..d5e68b2d4171 100644 --- a/UPGRADE-3.1.md +++ b/UPGRADE-3.1.md @@ -39,7 +39,10 @@ Form 'choice_label' => function ($choice) { return strtoupper($choice); }, - ``` + ``` + + * Caching of the loaded `ChoiceListInterface` in the `LazyChoiceList` has been deprecated, + it must be cached in the `ChoiceLoaderInterface` implementation instead. FrameworkBundle --------------- diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md index 14758b4ab4ef..ccd4c7ae00bd 100644 --- a/UPGRADE-4.0.md +++ b/UPGRADE-4.0.md @@ -36,6 +36,8 @@ Form }, ``` + * Caching of the loaded `ChoiceListInterface` in the `LazyChoiceList` has been removed, + it must be cached in the `ChoiceLoaderInterface` implementation instead. FrameworkBundle --------------- diff --git a/src/Symfony/Bridge/Doctrine/CHANGELOG.md b/src/Symfony/Bridge/Doctrine/CHANGELOG.md index d6857deeed29..f187e970f98f 100644 --- a/src/Symfony/Bridge/Doctrine/CHANGELOG.md +++ b/src/Symfony/Bridge/Doctrine/CHANGELOG.md @@ -7,6 +7,8 @@ CHANGELOG * added "{{ value }}" message placeholder to UniqueEntityValidator * deprecated `MergeDoctrineCollectionListener::onBind` in favor of `MergeDoctrineCollectionListener::onSubmit` + * deprecated passing `ChoiceListFactoryInterface` as first argument of + `DoctrineChoiceLoader`'s constructor 3.0.0 ----- diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php index 1b2a35ce534a..046338c035e6 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php @@ -24,11 +24,6 @@ */ class DoctrineChoiceLoader implements ChoiceLoaderInterface { - /** - * @var ChoiceListFactoryInterface - */ - private $factory; - /** * @var ObjectManager */ @@ -78,7 +73,6 @@ public function __construct($manager, $class, $idReader = null, $objectLoader = // Provide a BC layer since $factory has changed // form first to last argument as of 3.1 - $this->factory = $manager; $manager = $class; $class = $idReader; $objectLoader = $factory; diff --git a/src/Symfony/Component/Form/CHANGELOG.md b/src/Symfony/Component/Form/CHANGELOG.md index 58f4e0e61fd4..5608e296b276 100644 --- a/src/Symfony/Component/Form/CHANGELOG.md +++ b/src/Symfony/Component/Form/CHANGELOG.md @@ -10,6 +10,7 @@ CHANGELOG * Using callable strings as choice options in `ChoiceType` has been deprecated and will be used as `PropertyPath` instead of callable in Symfony 4.0. * implemented `DataTransformerInterface` in `TextType` + * deprecated caching loaded choice list in `LazyChoiceList::$loadedList` 3.0.0 -----