Skip to content

Commit 695168a

Browse files
committed
Merge branch '2.8'
Conflicts: CHANGELOG-2.3.md CHANGELOG-2.7.md composer.json src/Symfony/Bridge/Twig/composer.json src/Symfony/Bundle/FrameworkBundle/composer.json src/Symfony/Bundle/SecurityBundle/composer.json src/Symfony/Component/Console/Tests/Helper/LegacyProgressHelperTest.php src/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php src/Symfony/Component/Console/composer.json src/Symfony/Component/DomCrawler/composer.json src/Symfony/Component/Form/Tests/FormRegistryTest.php src/Symfony/Component/Form/composer.json src/Symfony/Component/HttpFoundation/composer.json src/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php src/Symfony/Component/Intl/composer.json src/Symfony/Component/Ldap/composer.json src/Symfony/Component/Security/Core/composer.json src/Symfony/Component/Security/Csrf/composer.json src/Symfony/Component/Security/Http/composer.json src/Symfony/Component/Security/composer.json src/Symfony/Component/Serializer/Encoder/JsonEncoder.php src/Symfony/Component/Serializer/composer.json src/Symfony/Component/Templating/PhpEngine.php src/Symfony/Component/Translation/composer.json src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php src/Symfony/Component/VarDumper/composer.json
2 parents b58bbd6 + 302248f commit 695168a

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

Encoder/JsonDecode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function decode($data, $format, array $context = array())
8888
$decodedData = json_decode($data, $associative, $recursionDepth, $options);
8989

9090
if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) {
91-
throw new UnexpectedValueException(JsonEncoder::getLastErrorMessage());
91+
throw new UnexpectedValueException(json_last_error_message());
9292
}
9393

9494
return $decodedData;

Encoder/JsonEncode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function encode($data, $format, array $context = array())
4040
$encodedJson = json_encode($data, $context['json_encode_options']);
4141

4242
if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) {
43-
throw new UnexpectedValueException(JsonEncoder::getLastErrorMessage());
43+
throw new UnexpectedValueException(json_last_error_message());
4444
}
4545

4646
return $encodedJson;

Encoder/JsonEncoder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,13 @@ public function supportsDecoding($format)
7272
* Resolves json_last_error message.
7373
*
7474
* @return string
75+
*
76+
* @deprecated since 2.8, to be removed in 3.0. Use json_last_error_msg() instead.
7577
*/
7678
public static function getLastErrorMessage()
7779
{
80+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use json_last_error_msg() instead.', E_USER_DEPRECATED);
81+
7882
return json_last_error_msg();
7983
}
8084
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=5.5.9"
19+
"php": ">=5.5.9",
20+
"symfony/polyfill-php54": "~1.0"
2021
},
2122
"require-dev": {
2223
"symfony/yaml": "~2.8|~3.0",

0 commit comments

Comments
 (0)