minor #15596 Deprecation notices fixes (fabpot)
This PR was merged into the 2.8 branch. Discussion ---------- Deprecation notices fixes | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits -------19f4ada
fixed tests using deprecation features9d698e7
[Form] made deprecation notice more precise
This commit is contained in:
commit
e7772723bd
|
@ -346,7 +346,7 @@ class EntityTypeTest extends TypeTestCase
|
|||
|
||||
$this->persist(array($innerEntity1, $innerEntity2, $entity1, $entity2));
|
||||
|
||||
$field = $this->factory->createNamed('name', 'entity', null, array(
|
||||
$field = $this->factory->createNamed('name', 'Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array(
|
||||
'multiple' => false,
|
||||
'expanded' => false,
|
||||
'em' => 'default',
|
||||
|
@ -421,7 +421,7 @@ class EntityTypeTest extends TypeTestCase
|
|||
|
||||
$this->persist(array($innerEntity1, $innerEntity2, $innerEntity3, $entity1, $entity2, $entity3));
|
||||
|
||||
$field = $this->factory->createNamed('name', 'entity', null, array(
|
||||
$field = $this->factory->createNamed('name', 'Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array(
|
||||
'multiple' => true,
|
||||
'expanded' => false,
|
||||
'em' => 'default',
|
||||
|
@ -732,7 +732,7 @@ class EntityTypeTest extends TypeTestCase
|
|||
|
||||
$this->persist(array($innerEntity1, $innerEntity2, $entity1, $entity2));
|
||||
|
||||
$field = $this->factory->createNamed('name', 'entity', null, array(
|
||||
$field = $this->factory->createNamed('name', 'Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array(
|
||||
'em' => 'default',
|
||||
'class' => self::SINGLE_ASSOC_IDENT_CLASS,
|
||||
'choices' => array($entity1, $entity2),
|
||||
|
@ -804,7 +804,7 @@ class EntityTypeTest extends TypeTestCase
|
|||
|
||||
$repository = $this->em->getRepository(self::SINGLE_ASSOC_IDENT_CLASS);
|
||||
|
||||
$field = $this->factory->createNamed('name', 'entity', null, array(
|
||||
$field = $this->factory->createNamed('name', 'Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array(
|
||||
'em' => 'default',
|
||||
'class' => self::SINGLE_ASSOC_IDENT_CLASS,
|
||||
'query_builder' => $repository->createQueryBuilder('e')
|
||||
|
|
|
@ -101,7 +101,7 @@ class FormRegistry implements FormRegistryInterface
|
|||
}
|
||||
|
||||
if (isset($this->legacyNames[$name])) {
|
||||
@trigger_error('Accessing types by their string name is deprecated since version 2.8 and will be removed in 3.0. Use the fully-qualified type class name instead.', E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('Accessing type "%s" by its string name is deprecated since version 2.8 and will be removed in 3.0. Use the fully-qualified type class name "%s" instead.', $name, get_class($this->types[$name]->getInnerType())), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->types[$name];
|
||||
|
@ -171,7 +171,7 @@ class FormRegistry implements FormRegistryInterface
|
|||
public function hasType($name)
|
||||
{
|
||||
if (isset($this->legacyNames[$name])) {
|
||||
@trigger_error('Accessing types by their string name is deprecated since version 2.8 and will be removed in 3.0. Use the fully-qualified type class name instead.', E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('Accessing type "%s" by its string name is deprecated since version 2.8 and will be removed in 3.0. Use the fully-qualified type class name "%s" instead.', $name, get_class($this->types[$name]->getInnerType())), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
if (isset($this->types[$name])) {
|
||||
|
|
Reference in New Issue