Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cd9bbb5

Browse files
committed
minor #20312 [DoctrineBridge] Remove dead code in DoctrineType (yceruto)
This PR was merged into the 3.1 branch. Discussion ---------- [DoctrineBridge] Remove dead code in DoctrineType | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | no | New feature? | no | BC breaks? | no (Only the last arguments of a method may be removed [[3]](http://symfony.com/doc/current/contributing/code/bc.html#id13) ) | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - After optimization of DoctrineChoiceLoader (86b2ff1 in #18359) this code died :) Commits ------- 9b49723 remove dead code
2 parents 8c787a5 + 9b49723 commit cd9bbb5

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@
2020
use Symfony\Bridge\Doctrine\Form\EventListener\MergeDoctrineCollectionListener;
2121
use Symfony\Component\Form\AbstractType;
2222
use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator;
23-
use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;
24-
use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory;
25-
use Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator;
2623
use Symfony\Component\Form\Exception\RuntimeException;
2724
use Symfony\Component\Form\FormBuilderInterface;
2825
use Symfony\Component\OptionsResolver\Options;
2926
use Symfony\Component\OptionsResolver\OptionsResolver;
30-
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
3127

3228
abstract class DoctrineType extends AbstractType
3329
{
@@ -36,11 +32,6 @@ abstract class DoctrineType extends AbstractType
3632
*/
3733
protected $registry;
3834

39-
/**
40-
* @var ChoiceListFactoryInterface
41-
*/
42-
private $choiceListFactory;
43-
4435
/**
4536
* @var IdReader[]
4637
*/
@@ -108,15 +99,9 @@ public function getQueryBuilderPartsForCachingHash($queryBuilder)
10899
return false;
109100
}
110101

111-
public function __construct(ManagerRegistry $registry, PropertyAccessorInterface $propertyAccessor = null, ChoiceListFactoryInterface $choiceListFactory = null)
102+
public function __construct(ManagerRegistry $registry)
112103
{
113104
$this->registry = $registry;
114-
$this->choiceListFactory = $choiceListFactory ?: new CachingFactoryDecorator(
115-
new PropertyAccessDecorator(
116-
new DefaultChoiceListFactory(),
117-
$propertyAccessor
118-
)
119-
);
120105
}
121106

122107
public function buildForm(FormBuilderInterface $builder, array $options)

0 commit comments

Comments
 (0)