Skip to content

[2.7] adds deprecation notices. #13060

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 13 commits into from
Jan 5, 2015
Prev Previous commit
Next Next commit
[Form] adds more deprecation notices.
  • Loading branch information
Hugo Hamon committed Jan 5, 2015
commit e608ba6f1a4a461ecbc411b74a28aba527f666b4
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\Form\Extension\Validator\Constraints\Deprecated;

trigger_error('Constant ERR_INVALID in class Symfony\Component\Form\Extension\Validator\Constraints\Form is deprecated since version 2.6 and will be removed in 3.0. Use NOT_SYNCHRONIZED_ERROR constant instead.', E_USER_DEPRECATED);

/**
* @deprecated since version 2.7, to be removed in 3.0.
* @internal
*/
final class Form
{
const ERR_INVALID = 1;

private function __construct()
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Component\Form\Extension\Validator\Constraints;

use Symfony\Component\Form\Extension\Validator\Constraints\Deprecated\Form as Deprecated;
use Symfony\Component\Validator\Constraint;

/**
Expand All @@ -22,10 +23,10 @@ class Form extends Constraint
const NO_SUCH_FIELD_ERROR = 2;

/**
* @deprecated since version 2.6, to be removed in 3.0. Use
* {@self NOT_SYNCHRONIZED_ERROR} instead.
* @deprecated since version 2.6, to be removed in 3.0.
* Use {@self NOT_SYNCHRONIZED_ERROR} instead.
*/
const ERR_INVALID = 1;
const ERR_INVALID = Deprecated::ERR_INVALID;

protected static $errorNames = array(
self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR',
Expand Down