Skip to content

Commit 0de8905

Browse files
committed
feature #15285 [Config] deprecate cannotBeEmpty() for boolean and numeric 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
2 parents ce5363a + d4473f3 commit 0de8905

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ public function __construct($name, NodeParentInterface $parent = null)
3030
$this->nullEquivalent = true;
3131
}
3232

33+
/**
34+
* {@inheritdoc}
35+
*
36+
* @deprecated Deprecated since version 2.8, to be removed in 3.0.
37+
*/
38+
public function cannotBeEmpty()
39+
{
40+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
41+
42+
return parent::cannotBeEmpty();
43+
}
44+
3345
/**
3446
* Instantiate a Node.
3547
*

src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,16 @@ public function min($min)
5858

5959
return $this;
6060
}
61+
62+
/**
63+
* {@inheritdoc}
64+
*
65+
* @deprecated Deprecated since version 2.8, to be removed in 3.0.
66+
*/
67+
public function cannotBeEmpty()
68+
{
69+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
70+
71+
return parent::cannotBeEmpty();
72+
}
6173
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy