[Config] deprecate cannotBeEmpty() for boolean and numeric nodes

This commit is contained in:
Christian Flothmann 2015-07-15 19:30:30 +02:00
parent aefd16d4f3
commit d4473f30f8
2 changed files with 24 additions and 0 deletions

View File

@ -30,6 +30,18 @@ class BooleanNodeDefinition extends ScalarNodeDefinition
$this->nullEquivalent = true;
}
/**
* {@inheritdoc}
*
* @deprecated Deprecated since version 2.8, to be removed in 3.0.
*/
public function cannotBeEmpty()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
return parent::cannotBeEmpty();
}
/**
* Instantiate a Node.
*

View File

@ -58,4 +58,16 @@ abstract class NumericNodeDefinition extends ScalarNodeDefinition
return $this;
}
/**
* {@inheritdoc}
*
* @deprecated Deprecated since version 2.8, to be removed in 3.0.
*/
public function cannotBeEmpty()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
return parent::cannotBeEmpty();
}
}