8000 [Serializer] Remove deprecated JSON error methods · symfony/symfony@269aca6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 269aca6

Browse files
committed
[Serializer] Remove deprecated JSON error methods
1 parent 56ad3e6 commit 269aca6

File tree

3 files changed

+0
-62
lines changed

3 files changed

+0
-62
lines changed

src/Symfony/Component/Serializer/Encoder/JsonDecode.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,6 @@ public function __construct($associative = false, $depth = 512)
5050
$this->recursionDepth = (int) $depth;
5151
}
5252

53-
/**
54-
* Returns the last decoding error (if any).
55-
*
56-
* @return int
57-
*
58-
* @deprecated since version 2.5, to be removed in 3.0.
59-
* The {@self decode()} method throws an exception if error found.
60-
*
61-
* @see http://php.net/manual/en/function.json-last-error.php json_last_error
62-
*/
63-
public function getLastError()
64-
{
65-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the decode() method instead to get the last JSON decoding error.', E_USER_DEPRECATED);
66-
67-
return $this->lastError;
68-
}
69-
7053
/**
7154
* Decodes data.
7255
*

src/Symfony/Component/Serializer/Encoder/JsonEncode.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,6 @@ public function __construct($bitmask = 0)
2828
$this->options = $bitmask;
2929
}
3030

31-
/**
32-
* Returns the last encoding error (if any).
33-
*
34-
* @return int
35-
*
36-
* @deprecated since version 2.5, to be removed in 3.0.
37-
* The {@self encode()} throws an exception if error found.
38-
*
39-
* @see http://php.net/manual/en/function.json-last-error.php json_last_error
40-
*/
41-
public function getLastError()
42-
{
43-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the encode() method instead to get the last JSON encoding error.', E_USER_DEPRECATED);
44-
45-
return $this->lastError;
46-
}
47-
4831
/**
4932
* Encodes PHP data to a JSON string.
5033
*

src/Symfony/Component/Serializer/Encoder/JsonEncoder.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,34 +36,6 @@ public function __construct(JsonEncode $encodingImpl = null, JsonDecode $decodin
3636
$this->decodingImpl = $decodingImpl ?: new JsonDecode(true);
3737
}
3838

39-
/**
40-
* Returns the last encoding error (if any).
41-
*
42-
* @return int
43-
*
44-
* @deprecated since version 2.5, to be removed in 3.0. JsonEncode throws exception if an error is found.
45-
*/
46-
public function getLastEncodingError()
47-
{
48-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\Component\Serializer\Encoder\JsonEncode::encode() method instead to get the last JSON encoding error.', E_USER_DEPRECATED);
49-
50-
return $this->encodingImpl->getLastError();
51-
}
52-
53-
/**
54-
* Returns the last decoding error (if any).
55-
*
56-
* @return int
57-
*
58-
* @deprecated since version 2.5, to be removed in 3.0. JsonDecode throws exception if an error is found.
59-
*/
60-
public function getLastDecodingError()
61-
{
62-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\Component\Serializer\Encoder\JsonDecode::decode() method instead to get the last JSON decoding error.', E_USER_DEPRECATED);
63-
64-
return $this->decodingImpl->getLastError();
65-
}
66-
6739
/**
6840
* {@inheritdoc}
6941
*/

0 commit comments

Comments
 (0)
0