minor #14642 [Validator] Deprecated PHP7-incompatible constraints and related validators (nicolas-grekas)
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Deprecated PHP7-incompatible constraints and related validators
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
a3fc6b9
[Validator] Deprecated PHP7-incompatible constraints and related validators
This commit is contained in:
commit
fcebef3f8a
@ -528,3 +528,9 @@ Config
|
|||||||
* The `__toString()` method of the `\Symfony\Component\Config\ConfigCache` is marked as
|
* The `__toString()` method of the `\Symfony\Component\Config\ConfigCache` is marked as
|
||||||
deprecated in favor of the new `getPath()` method.
|
deprecated in favor of the new `getPath()` method.
|
||||||
|
|
||||||
|
Validator
|
||||||
|
---------
|
||||||
|
|
||||||
|
* The PHP7-incompatible constraints (Null, True, False) and related validators
|
||||||
|
(NullValidator, TrueValidator, FalseValidator) are marked as deprecated
|
||||||
|
in favor of their `Is`-prefixed equivalent.
|
||||||
|
@ -5,6 +5,7 @@ CHANGELOG
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
* deprecated `DefaultTranslator` in favor of `Symfony\Component\Translation\IdentityTranslator`
|
* deprecated `DefaultTranslator` in favor of `Symfony\Component\Translation\IdentityTranslator`
|
||||||
|
* deprecated PHP7-incompatible constraints (Null, True, False) and related validators (NullValidator, TrueValidator, FalseValidator) in favor of their `Is`-prefixed equivalent
|
||||||
|
|
||||||
2.6.0
|
2.6.0
|
||||||
-----
|
-----
|
||||||
|
@ -11,12 +11,14 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\Validator\Constraints;
|
namespace Symfony\Component\Validator\Constraints;
|
||||||
|
|
||||||
|
trigger_error('The '.__NAMESPACE__.'\False class is deprecated since version 2.7 and will be removed in 3.0. Use the IsFalse class in the same namespace instead.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
|
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
|
||||||
*
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*
|
*
|
||||||
* @api
|
* @deprecated since version 2.7, to be removed in 3.0. Use IsFalse instead.
|
||||||
*/
|
*/
|
||||||
class False extends IsFalse {}
|
class False extends IsFalse {}
|
||||||
|
@ -11,9 +11,11 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\Validator\Constraints;
|
namespace Symfony\Component\Validator\Constraints;
|
||||||
|
|
||||||
|
trigger_error('The '.__NAMESPACE__.'\FalseValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsFalseValidator class in the same namespace instead.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*
|
*
|
||||||
* @api
|
* @deprecated since version 2.7, to be removed in 3.0. Use IsFalseValidator instead.
|
||||||
*/
|
*/
|
||||||
class FalseValidator extends IsFalseValidator {}
|
class FalseValidator extends IsFalseValidator {}
|
||||||
|
@ -11,12 +11,14 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\Validator\Constraints;
|
namespace Symfony\Component\Validator\Constraints;
|
||||||
|
|
||||||
|
trigger_error('The '.__NAMESPACE__.'\Null class is deprecated since version 2.7 and will be removed in 3.0. Use the IsNull class in the same namespace instead.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
|
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
|
||||||
*
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*
|
*
|
||||||
* @api
|
* @deprecated since version 2.7, to be removed in 3.0. Use IsNull instead.
|
||||||
*/
|
*/
|
||||||
class Null extends IsNull {}
|
class Null extends IsNull {}
|
||||||
|
@ -11,9 +11,11 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\Validator\Constraints;
|
namespace Symfony\Component\Validator\Constraints;
|
||||||
|
|
||||||
|
trigger_error('The '.__NAMESPACE__.'\NullValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsNullValidator class in the same namespace instead.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*
|
*
|
||||||
* @api
|
* @deprecated since version 2.7, to be removed in 3.0. Use IsNullValidator instead.
|
||||||
*/
|
*/
|
||||||
class NullValidator extends IsNullValidator {}
|
class NullValidator extends IsNullValidator {}
|
||||||
|
@ -11,12 +11,14 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\Validator\Constraints;
|
namespace Symfony\Component\Validator\Constraints;
|
||||||
|
|
||||||
|
trigger_error('The '.__NAMESPACE__.'\True class is deprecated since version 2.7 and will be removed in 3.0. Use the IsTrue class in the same namespace instead.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Annotation
|
* @Annotation
|
||||||
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
|
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
|
||||||
*
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*
|
*
|
||||||
* @api
|
* @deprecated since version 2.7, to be removed in 3.0. Use IsTrue instead.
|
||||||
*/
|
*/
|
||||||
class True extends IsTrue {}
|
class True extends IsTrue {}
|
||||||
|
@ -11,9 +11,11 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\Validator\Constraints;
|
namespace Symfony\Component\Validator\Constraints;
|
||||||
|
|
||||||
|
trigger_error('The '.__NAMESPACE__.'\TrueValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsTrueValidator class in the same namespace instead.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*
|
*
|
||||||
* @api
|
* @deprecated since version 2.7, to be removed in 3.0. Use IsTrueValidator instead.
|
||||||
*/
|
*/
|
||||||
class TrueValidator extends IsTrueValidator {}
|
class TrueValidator extends IsTrueValidator {}
|
||||||
|
Reference in New Issue
Block a user