Skip to content

Commit

Permalink
feature #15285 [Config] deprecate cannotBeEmpty() for boolean and num…
Browse files Browse the repository at this point in the history
…eric nodes (xabbuh)

This PR was merged into the 2.8 branch.

Discussion
----------

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

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

d4473f3 [Config] deprecate cannotBeEmpty() for boolean and numeric nodes
  • Loading branch information
fabpot committed Aug 1, 2015
2 parents ce5363a + d4473f3 commit 0de8905
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Expand Up @@ -30,6 +30,18 @@ public function __construct($name, NodeParentInterface $parent = null)
$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.
*
Expand Down
Expand Up @@ -58,4 +58,16 @@ public function min($min)

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();
}
}

0 comments on commit 0de8905

Please sign in to comment.