minor #13325 [Yaml] removed deprecation notices on internal constant (fabpot)

This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] removed deprecation notices on internal constant

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | antonioribeiro/tracker#56, #13306
| License       | MIT
| Doc PR        | n/a

Reverting the deprecated notices on `Unescaper::ENCODING` for two reasons:

 * The constant is only used internally and nobody ever used it anyway;
 * The deprecation notice is ALWAYS triggered when using the YAML component.

Commits
-------

faeed58 [Yaml] removed deprecation notices on internal constant
This commit is contained in:
Fabien Potencier 2015-01-08 14:01:33 +01:00
commit e52754f1f3
2 changed files with 2 additions and 22 deletions

View File

@ -1,19 +0,0 @@
<?php
namespace Symfony\Component\Yaml\Deprecated;
trigger_error('Constant ENCODING in class Symfony\Component\Yaml\Unescaper is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
/**
* @deprecated since version 2.7, to be removed in 3.0.
* @internal
*/
final class Unescaper
{
const ENCODING = 'UTF-8';
private function __construct()
{
}
}

View File

@ -11,8 +11,6 @@
namespace Symfony\Component\Yaml;
use Symfony\Component\Yaml\Deprecated\Unescaper as Deprecated;
/**
* Unescaper encapsulates unescaping rules for single and double-quoted
* YAML strings.
@ -26,8 +24,9 @@ class Unescaper
* must be converted to that encoding.
*
* @deprecated since version 2.5, to be removed in 3.0
* @internal
*/
const ENCODING = Deprecated::ENCODING;
const ENCODING = 'UTF-8';
/**
* Regex fragment that matches an escaped character in a double quoted string.