namespace Symfony\Component\Config\Definition\Builder;
use Symfony\Component\Config\Definition\BooleanNode;
+use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;
/**
* This class provides a fluent interface for defining a node.
}
/**
- * {@inheritdoc}
+ * Instantiate a Node.
*
- * @deprecated Deprecated since version 2.8, to be removed in 3.0.
+ * @return BooleanNode The node
*/
- public function cannotBeEmpty()
+ protected function instantiateNode()
{
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
-
- return parent::cannotBeEmpty();
+ return new BooleanNode($this->name, $this->parent);
}
/**
- * Instantiate a Node.
+ * {@inheritdoc}
*
- * @return BooleanNode The node
+ * @throws InvalidDefinitionException
*/
- protected function instantiateNode()
+ public function cannotBeEmpty()
{
- return new BooleanNode($this->name, $this->parent);
+ throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to BooleanNodeDefinition.');
}
}