Skip to content

Commit 0cd8bf8

Browse files
ycerutofabpot
authored andcommitted
Remove dead code
1 parent fe55075 commit 0cd8bf8

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,20 @@
1414
use Doctrine\Common\Persistence\ManagerRegistry;
1515
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
1616
use Symfony\Component\Form\AbstractExtension;
17-
use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator;
18-
use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;
19-
use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory;
20-
use Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator;
21-
use Symfony\Component\PropertyAccess\PropertyAccess;
22-
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
2317

2418
class DoctrineOrmExtension extends AbstractExtension
2519
{
2620
protected $registry;
2721

28-
/**
29-
* @var PropertyAccessorInterface
30-
*/
31-
private $propertyAccessor;
32-
33-
/**
34-
* @var ChoiceListFactoryInterface
35-
*/
36-
private $choiceListFactory;
37-
38-
public function __construct(ManagerRegistry $registry, PropertyAccessorInterface $propertyAccessor = null, ChoiceListFactoryInterface $choiceListFactory = null)
22+
public function __construct(ManagerRegistry $registry)
3923
{
4024
$this->registry = $registry;
41-
$this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
42-
$this->choiceListFactory = $choiceListFactory ?: new CachingFactoryDecorator(new PropertyAccessDecorator(new DefaultChoiceListFactory(), $this->propertyAccessor));
4325
}
4426

4527
protected function loadTypes()
4628
{
4729
return array(
48-
new EntityType($this->registry, $this->propertyAccessor, $this->choiceListFactory),
30+
new EntityType($this->registry),
4931
);
5032
}
5133

0 commit comments

Comments
 (0)