Skip to content

Commit e608ba6

Browse files
author
Hugo Hamon
committed
[Form] adds more deprecation notices.
1 parent cd9617a commit e608ba6

File tree

2 files changed

+31
-3
lines changed
  • src/Symfony/Component/Form/Extension/Validator/Constraints

2 files changed

+31
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Form\Extension\Validator\Constraints\Deprecated;
13+
14+
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);
15+
16+
/**
17+
* @deprecated since version 2.7, to be removed in 3.0.
18+
* @internal
19+
*/
20+
final class Form
21+
{
22+
const ERR_INVALID = 1;
23+
24+
private function __construct()
25+
{
26+
}
27+
}

src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

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

14+
use Symfony\Component\Form\Extension\Validator\Constraints\Deprecated\Form as Deprecated;
1415
use Symfony\Component\Validator\Constraint;
1516

1617
/**
@@ -22,10 +23,10 @@ class Form extends Constraint
2223
const NO_SUCH_FIELD_ERROR = 2;
2324

2425
/**
25-
* @deprecated since version 2.6, to be removed in 3.0. Use
26-
* {@self NOT_SYNCHRONIZED_ERROR} instead.
26+
* @deprecated since version 2.6, to be removed in 3.0.
27+
* Use {@self NOT_SYNCHRONIZED_ERROR} instead.
2728
*/
28-
const ERR_INVALID = 1;
29+
const ERR_INVALID = Deprecated::ERR_INVALID;
2930

3031
protected static $errorNames = array(
3132
self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR',

0 commit comments

Comments
 (0)