Skip to content

Commit edf4c7d

Browse files
webmozartnicolas-grekas
authored andcommitted
[Form] Moved deprecation notice triggers to file level
1 parent c32e94d commit edf4c7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Form/ChoiceList/EntityChoiceList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Bridge\Doctrine\Form\ChoiceList;
1313

14+
trigger_error('The '.__NAMESPACE__.'\EntityChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader instead.', E_USER_DEPRECATED);
15+
1416
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
1517
use Doctrine\Common\Persistence\ObjectManager;
1618
use Symfony\Component\Form\Exception\RuntimeException;
@@ -129,8 +131,6 @@ public function __construct(ObjectManager $manager, $class, $labelPath = null, E
129131
}
130132

131133
parent::__construct($entities, $labelPath, $preferredEntities, $groupPath, null, $propertyAccessor);
132-
133-
trigger_error('The '.__CLASS__.' class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader instead.', E_USER_DEPRECATED);
134134
}
135135

136136
/**

0 commit comments

Comments
 (0)