Skip to content

Commit 14c3319

Browse files
committed
minor #14200 [Form] Updated CHANGELOG and UPGRADE files (webmozart)
This PR was merged into the 2.7 branch. Discussion ---------- [Form] Updated CHANGELOG and UPGRADE files | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This PR includes the changes from #14050 in the CHANGELOG/UPGRADE files. Commits ------- 6863ba5 [Form] Updated CHANGELOG and UPGRADE files
2 parents 0af92dd + bca7421 commit 14c3319

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
CHANGELOG
22
=========
33

4+
2.7.0
5+
-----
6+
7+
* added DoctrineChoiceLoader
8+
* deprecated EntityChoiceList
9+
* deprecated passing a query builder closure to ORMQueryBuilderLoader
10+
* deprecated $manager and $em arguments of ORMQueryBuilderLoader
11+
* added optional arguments $propertyAccessor and $choiceListFactory to DoctrineOrmExtension constructor
12+
* deprecated "loader" and "property" options of DoctrineType
13+
414
2.4.0
515
-----
616

Form/ChoiceList/DoctrineChoiceLoader.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ class DoctrineChoiceLoader implements ChoiceLoaderInterface
6969
* IDs.
7070
* @param null|EntityLoaderInterface $objectLoader The objects loader
7171
*/
72-
public function __construct(ChoiceListFactoryInterface $factory, ObjectManager $manager, $class, IdReader $idReader, EntityLoaderInterface $objectLoader = null)
72+
public function __construct(ChoiceListFactoryInterface $factory, ObjectManager $manager, $class, IdReader $idReader = null, EntityLoaderInterface $objectLoader = null)
7373
{
74+
$classMetadata = $manager->getClassMetadata($class);
75+
7476
$this->factory = $factory;
7577
$this->manager = $manager;
76-
$this->class = $manager->getClassMetadata($class)->getName();
77-
$this->idReader = $idReader;
78+
$this->class = $classMetadata->getName();
79+
$this->idReader = $idReader ?: new IdReader($manager, $classMetadata);
7880
$this->objectLoader = $objectLoader;
7981
}
8082

0 commit comments

Comments
 (0)