8000 [Validator] Deprecated PHP7-incompatible constraints and related validators by nicolas-grekas · Pull Request #14642 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Validator] Deprecated PHP7-incompatible constraints and related validators #14642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions UPGRADE-2.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -528,3 +528,9 @@ Config
* The `__toString()` method of the `\Symfony\Component\Config\ConfigCache` is marked as
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.
1 change: 1 addition & 0 deletions src/Symfony/Component/Validator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CHANGELOG
-----

* 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
-----
Expand Down
4 changes: 3 additions & 1 deletion src/Symfony/Component/Validator/Constraints/False.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@

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
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
*
* @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 {}
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@

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>
*
* @api
* @deprecated since version 2.7, to be removed in 3.0. Use IsFalseValidator instead.
*/
class FalseValidator extends IsFalseValidator {}
4 changes: 3 additions & 1 deletion src/Symfony/Component/Validator/Constraints/Null.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@

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
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
*
* @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 {}
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@

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>
*
* @api
* @deprecated since version 2.7, to be removed in 3.0. Use IsNullValidator instead.
*/
class NullValidator extends IsNullValidator {}
4 changes: 3 additions & 1 deletion src/Symfony/Component/Validator/Constraints/True.php 8000
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@

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
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
*
* @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 {}
610F
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@

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>
*
* @api
* @deprecated since version 2.7, to be removed in 3.0. Use IsTrueValidator instead.
*/
class TrueValidator extends IsTrueValidator {}
0