Skip to content

Commit cca77dd

Browse files
Merge branch '3.2' into 3.3
* 3.2: Don't display the Symfony debug toolbar when printing the page do not wire namespaces for the ArrayAdapter [Cache] Added test for ApcuAdapter when using in CLI allow to configure custom formats in XML configs [HttpKernel] fix DumpDataCollector tests [FrameworkBundle] fix changelog [WebProfilerBundle] Cleanup profiler leftover require the XML PHP extension Fix phpdoc for serializer normalizers exceptions Fixed absolute url generation for query strings and hash urls bumped Symfony version to 2.8.25 updated VERSION for 2.8.24 updated CHANGELOG for 2.8.24 bumped Symfony version to 2.7.32 [Filesystem] Dont copy perms when origin is remote updated VERSION for 2.7.31 update CONTRIBUTORS for 2.7.31 updated CHANGELOG for 2.7.31
2 parents 419d822 + dc98d5a commit cca77dd

File tree

5 files changed

+23
-8
lines changed

5 files changed

+23
-8
lines changed

Normalizer/AbstractObjectNormalizer.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException;
1515
use Symfony\Component\Serializer\Encoder\JsonEncoder;
16-
use Symfony\Component\Serializer\Exception\CircularReferenceException;
1716
use Symfony\Component\Serializer\Exception\ExtraAttributesException;
1817
use Symfony\Component\Serializer\Exception\LogicException;
1918
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
@@ -54,8 +53,6 @@ public function supportsNormalization($data, $format = null)
5453

5554
/**
5655
* {@inheritdoc}
57-
*
58-
* @throws CircularReferenceException
5956
*/
6057
public function normalize($object, $format = null, array $context = array())
6158
{

Normalizer/ArrayDenormalizer.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ class ArrayDenormalizer implements DenormalizerInterface, SerializerAwareInterfa
3333

3434
/**
3535
* {@inheritdoc}
36-
*
37-
* @throws UnexpectedValueException
3836
*/
3937
public function denormalize($data, $class, $format = null, array $context = array())
4038
{

Normalizer/DataUriNormalizer.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ public function supportsNormalization($data, $format = null)
7979
* Regex adapted from Brian Grinstead code.
8080
*
8181
* @see https://gist.github.com/bgrins/6194623
82-
*
83-
* @throws InvalidArgumentException
84-
* @throws UnexpectedValueException
8582
*/
8683
public function denormalize($data, $class, $format = null, array $context = array())
8784
{

Normalizer/DenormalizerInterface.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111

1212
namespace Symfony\Component\Serializer\Normalizer;
1313

14+
use Symfony\Component\Serializer\Exception\BadMethodCallException;
15+
use Symfony\Component\Serializer\Exception\ExtraAttributesException;
16+
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
17+
use Symfony\Component\Serializer\Exception\LogicException;
18+
use Symfony\Component\Serializer\Exception\RuntimeException;
19+
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
20+
1421
/**
1522
* Defines the interface of denormalizers.
1623
*
@@ -27,6 +34,13 @@ interface DenormalizerInterface
2734
* @param array $context options available to the denormalizer
2835
*
2936
* @return object
37+
*
38+
* @throws BadMethodCallException Occurs when the normalizer is not called in an expected context
39+
* @throws InvalidArgumentException Occurs when the arguments are not coherent or not supported
40+
* @throws UnexpectedValueException Occurs when the item cannot be hydrated with the given data
41+
* @throws ExtraAttributesException Occurs when the item doesn't have attribute to receive given data
42+
* @throws LogicException Occurs when the normalizer is not supposed to denormalize
43+
* @throws RuntimeException Occurs if the class cannot be instantiated
3044
*/
3145
public function denormalize($data, $class, $format = null, array $context = array());
3246

Normalizer/NormalizerInterface.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
namespace Symfony\Component\Serializer\Normalizer;
1313

14+
use Symfony\Component\Serializer\Exception\CircularReferenceException;
15+
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
16+
use Symfony\Component\Serializer\Exception\LogicException;
17+
1418
/**
1519
* Defines the interface of normalizers.
1620
*
@@ -26,6 +30,11 @@ interface NormalizerInterface
2630
* @param array $context Context options for the normalizer
2731
*
2832
* @return array|scalar
33+
*
34+
* @throws InvalidArgumentException Occurs when the object given is not an attempted type for the normalizer
35+
* @throws CircularReferenceException Occurs when the normalizer detects a circular reference when no circular
36+
* reference handler can fix it
37+
* @throws LogicException Occurs when the normalizer is not called in an expected context
2938
*/
3039
public function normalize($object, $format = null, array $context = array());
3140

0 commit comments

Comments
 (0)