diff --git a/core/composer.lock b/core/composer.lock index 18db64de4a71d52abdf9dd641af60f1696f505b1..7d2a9431bf3c41617484e8261109dbc35f3d5b22 100644 --- a/core/composer.lock +++ b/core/composer.lock @@ -811,18 +811,18 @@ "source": { "type": "git", "url": "https://github.com/symfony/Serializer", - "reference": "45fe843e3144a594f93a6a372385c6534c7df31c" + "reference": "ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Serializer/archive/45fe843e3144a594f93a6a372385c6534c7df31c.zip", - "reference": "45fe843e3144a594f93a6a372385c6534c7df31c", + "url": "https://github.com/symfony/Serializer/archive/ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0.zip", + "reference": "ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2013-01-19 07:50:02", + "time": "2012-12-19 07:09:49", "type": "library", "extra": { "branch-alias": { diff --git a/core/lib/Drupal/Core/Serialization/ComplexDataNormalizer.php b/core/lib/Drupal/Core/Serialization/ComplexDataNormalizer.php index 642352d307b155fb2d44e87aaddafd4e0068ddb0..06a54158fa8d6c35ffda0493060460806940658a 100644 --- a/core/lib/Drupal/Core/Serialization/ComplexDataNormalizer.php +++ b/core/lib/Drupal/Core/Serialization/ComplexDataNormalizer.php @@ -32,7 +32,7 @@ class ComplexDataNormalizer extends NormalizerBase { /** * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize(). */ - public function normalize($object, $format = NULL, array $context = array()) { + public function normalize($object, $format = NULL) { $attributes = array(); foreach ($object as $name => $field) { $attributes[$name] = $this->serializer->normalize($field, $format); diff --git a/core/lib/Drupal/Core/Serialization/ListNormalizer.php b/core/lib/Drupal/Core/Serialization/ListNormalizer.php index d590b7b55d6dd413b75ddf66cf2c3e23ccff866c..ee20fb64e5bf1bf3db09753fbbbe14848f0f25e0 100644 --- a/core/lib/Drupal/Core/Serialization/ListNormalizer.php +++ b/core/lib/Drupal/Core/Serialization/ListNormalizer.php @@ -31,7 +31,7 @@ class ListNormalizer extends NormalizerBase { /** * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize(). */ - public function normalize($object, $format = NULL, array $context = array()) { + public function normalize($object, $format = NULL) { $attributes = array(); foreach ($object as $fieldItem) { $attributes[] = $this->serializer->normalize($fieldItem, $format); diff --git a/core/lib/Drupal/Core/Serialization/TypedDataNormalizer.php b/core/lib/Drupal/Core/Serialization/TypedDataNormalizer.php index cf2a8795fafdf3899c7423ce0267c249e3a3d571..0376771e3d1a23323d1c61b5153d1625bea5bba5 100644 --- a/core/lib/Drupal/Core/Serialization/TypedDataNormalizer.php +++ b/core/lib/Drupal/Core/Serialization/TypedDataNormalizer.php @@ -25,7 +25,7 @@ class TypedDataNormalizer extends NormalizerBase { /** * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize(). */ - public function normalize($object, $format = NULL, array $context = array()) { + public function normalize($object, $format = NULL) { return $object->getValue(); } diff --git a/core/lib/Drupal/Core/Serialization/XmlEncoder.php b/core/lib/Drupal/Core/Serialization/XmlEncoder.php index d79a6d94234a7e20c66e0c1af288735de33f72a5..7235af3aa7a60aeea7cbf7d9c3056b0e9c900339 100644 --- a/core/lib/Drupal/Core/Serialization/XmlEncoder.php +++ b/core/lib/Drupal/Core/Serialization/XmlEncoder.php @@ -44,9 +44,9 @@ public function __construct() { /** * Implements \Symfony\Component\Serializer\Encoder\EncoderInterface::encode(). */ - public function encode($data, $format, array $context = array()){ - $normalized = $this->serializer->normalize($data, $format, $context); - return $this->baseEncoder->encode($normalized, $format, $context); + public function encode($data, $format){ + $normalized = $this->serializer->normalize($data, $format); + return $this->baseEncoder->encode($normalized, $format); } /** @@ -59,8 +59,8 @@ public function supportsEncoding($format) { /** * Implements \Symfony\Component\Serializer\Encoder\EncoderInterface::decode(). */ - public function decode($data, $format, array $context = array()){ - return $this->baseEncoder->decode($data, $format, $context); + public function decode($data, $format){ + return $this->baseEncoder->decode($data, $format); } /** diff --git a/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php b/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php index ab662b32e892739596c17086993ffac1b5a1f969..b28653902a9af312422e9006dc542ca7c5c85b0c 100644 --- a/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php +++ b/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php @@ -27,7 +27,7 @@ class JsonldEntityNormalizer extends JsonldNormalizerBase implements Denormalize /** * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize() */ - public function normalize($entity, $format = NULL, array $context = array()) { + public function normalize($entity, $format = NULL) { $entity_wrapper = new JsonldEntityWrapper($entity, $format, $this->serializer, $this->siteSchemaManager); $attributes = $entity_wrapper->getProperties(); @@ -43,7 +43,7 @@ public function normalize($entity, $format = NULL, array $context = array()) { * * @throws \Symfony\Component\Serializer\Exception\UnexpectedValueException */ - public function denormalize($data, $class, $format = null, array $context = array()) { + public function denormalize($data, $class, $format = null) { if (!isset($data['@type'])) { throw new UnexpectedValueException('JSON-LD @type parameter must be included.'); } diff --git a/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityReferenceNormalizer.php b/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityReferenceNormalizer.php index f57066dc6d4e2adef93357db1e3b25e6a5b7c800..66767cf49733c7e48d198f1d9ba3abfce4aa6fa3 100644 --- a/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityReferenceNormalizer.php +++ b/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityReferenceNormalizer.php @@ -30,7 +30,7 @@ class JsonldEntityReferenceNormalizer extends JsonldNormalizerBase implements De /** * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize() */ - public function normalize($object, $format = NULL, array $context = array()) { + public function normalize($object, $format = NULL) { // @todo If an $options parameter is added to the serialize signature, as // requested in https://github.com/symfony/symfony/pull/4938, then instead // of creating the array of properties, we could simply call normalize and @@ -45,7 +45,7 @@ public function normalize($object, $format = NULL, array $context = array()) { /** * Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::denormalize() */ - public function denormalize($data, $class, $format = null, array $context = array()) { + public function denormalize($data, $class, $format = null) { // @todo Support denormalization for Entity Reference. return array(); } diff --git a/core/modules/jsonld/lib/Drupal/jsonld/JsonldFieldItemNormalizer.php b/core/modules/jsonld/lib/Drupal/jsonld/JsonldFieldItemNormalizer.php index 7e3d1241a5a04ed46d20776613ee13dc9e9f90c4..bf421a100559424b27c68c15cd32ba3bc3b7d17d 100644 --- a/core/modules/jsonld/lib/Drupal/jsonld/JsonldFieldItemNormalizer.php +++ b/core/modules/jsonld/lib/Drupal/jsonld/JsonldFieldItemNormalizer.php @@ -27,14 +27,14 @@ class JsonldFieldItemNormalizer extends JsonldNormalizerBase implements Denormal /** * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize() */ - public function normalize($object, $format = NULL, array $context = array()) { + public function normalize($object, $format = NULL) { return $object->getPropertyValues(); } /** * Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::denormalize() */ - public function denormalize($data, $class, $format = null, array $context = array()) { + public function denormalize($data, $class, $format = null) { // For most fields, the field items array should simply be returned as is. return $data; } diff --git a/core/modules/jsonld/lib/Drupal/jsonld/JsonldRdfSchemaNormalizer.php b/core/modules/jsonld/lib/Drupal/jsonld/JsonldRdfSchemaNormalizer.php index 9c63332e41772d3aa90751acd9b32c63064ef54e..2834c6153bbf16cea51353132e7f5147db2a089e 100644 --- a/core/modules/jsonld/lib/Drupal/jsonld/JsonldRdfSchemaNormalizer.php +++ b/core/modules/jsonld/lib/Drupal/jsonld/JsonldRdfSchemaNormalizer.php @@ -25,7 +25,7 @@ class JsonldRdfSchemaNormalizer extends JsonldNormalizerBase { /** * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize() */ - public function normalize($data, $format = NULL, array $context = array()) { + public function normalize($data, $format = NULL) { $normalized = array(); $graph = $data->getGraph(); diff --git a/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestEncoder.php b/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestEncoder.php index edb3b5bda37add9db26cb27d055bb2953ace62b6..bf1a755d13dd82d4c91fcec40da44206369f6081 100644 --- a/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestEncoder.php +++ b/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestEncoder.php @@ -29,7 +29,7 @@ class SerializationTestEncoder implements EncoderInterface { * @return string * A string representation of $data in the requested format. */ - public function encode($data, $format, array $context = array()) { + public function encode($data, $format) { // @see Drupal\serialization_test\SerializationTestNormalizer::normalize(). return 'Normalized by ' . $data['normalized_by'] . ', Encoded by SerializationTestEncoder'; } diff --git a/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestNormalizer.php b/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestNormalizer.php index 81478c57924f666b235b9525a185cb42153b4067..5519fe95e8770ba4820b5315fb85bdd9e8948648 100644 --- a/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestNormalizer.php +++ b/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestNormalizer.php @@ -30,7 +30,7 @@ class SerializationTestNormalizer implements NormalizerInterface { * An array containing a normalized representation of $object, appropriate * for encoding to the requested format. */ - public function normalize($object, $format = NULL, array $context = array()) { + public function normalize($object, $format = NULL) { $normalized = (array) $object; // Add identifying value that can be used to verify that the expected // normalizer was invoked. diff --git a/core/vendor/autoload.php b/core/vendor/autoload.php index 86501ae8d955824a6f554d01847c0bf12ae9f86c..b7e57458296ad1d82ca6128cfa5b6e48b31af827 100644 --- a/core/vendor/autoload.php +++ b/core/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInit3c7622c3b1ba2ec69ca397628a542de0::getLoader(); +return ComposerAutoloaderInitdff5596d4902476e49b77f22ebf69e4a::getLoader(); diff --git a/core/vendor/composer/autoload_real.php b/core/vendor/composer/autoload_real.php index d682386ca760929354315ff10548ea06b7c21075..5784e03ce5dd8caac39d75aa4fd305ade0c5df8d 100644 --- a/core/vendor/composer/autoload_real.php +++ b/core/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php generated by Composer -class ComposerAutoloaderInit3c7622c3b1ba2ec69ca397628a542de0 +class ComposerAutoloaderInitdff5596d4902476e49b77f22ebf69e4a { private static $loader; @@ -19,9 +19,9 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit3c7622c3b1ba2ec69ca397628a542de0', 'loadClassLoader')); + spl_autoload_register(array('ComposerAutoloaderInitdff5596d4902476e49b77f22ebf69e4a', 'loadClassLoader')); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit3c7622c3b1ba2ec69ca397628a542de0', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitdff5596d4902476e49b77f22ebf69e4a', 'loadClassLoader')); $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); diff --git a/core/vendor/composer/installed.json b/core/vendor/composer/installed.json index 07eea1c2b1590f98670d35e054001b7ca46beaf4..e8e495c9a968aa7fc86d13a37fd7059f5adc1052 100644 --- a/core/vendor/composer/installed.json +++ b/core/vendor/composer/installed.json @@ -575,6 +575,55 @@ "description": "Symfony Routing Component", "homepage": "http://symfony.com" }, + { + "name": "symfony/serializer", + "version": "dev-master", + "version_normalized": "9999999-dev", + "target-dir": "Symfony/Component/Serializer", + "source": { + "type": "git", + "url": "https://github.com/symfony/Serializer", + "reference": "ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0" + }, + "dist": { + "type": "zip", + "url": "https://github.com/symfony/Serializer/archive/ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0.zip", + "reference": "ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2012-12-19 07:09:49", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "installation-source": "source", + "autoload": { + "psr-0": { + "Symfony\\Component\\Serializer\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony Serializer Component", + "homepage": "http://symfony.com" + }, { "name": "symfony/yaml", "version": "dev-master", @@ -931,54 +980,5 @@ "database", "routing" ] - }, - { - "name": "symfony/serializer", - "version": "dev-master", - "version_normalized": "9999999-dev", - "target-dir": "Symfony/Component/Serializer", - "source": { - "type": "git", - "url": "https://github.com/symfony/Serializer", - "reference": "45fe843e3144a594f93a6a372385c6534c7df31c" - }, - "dist": { - "type": "zip", - "url": "https://github.com/symfony/Serializer/archive/45fe843e3144a594f93a6a372385c6534c7df31c.zip", - "reference": "45fe843e3144a594f93a6a372385c6534c7df31c", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2013-01-19 07:50:02", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\Serializer\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Serializer Component", - "homepage": "http://symfony.com" } ] diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/.gitattributes b/core/vendor/symfony/serializer/Symfony/Component/Serializer/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..80481513cff2c5c6cde0c1bff5655bcde5f34976 --- /dev/null +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/.gitattributes @@ -0,0 +1,2 @@ +/Tests export-ignore +phpunit.xml.dist export-ignore diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/CHANGELOG.md b/core/vendor/symfony/serializer/Symfony/Component/Serializer/CHANGELOG.md index 6ccf5e5c4095fd0f6b041bd0091358f2d61f9226..de46533563bcce416181d3d39e459e86294a1a47 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/CHANGELOG.md +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/CHANGELOG.md @@ -1,16 +1,6 @@ CHANGELOG ========= -2.2.0 ------ - - * [BC BREAK] All Serializer, Normalizer and Encoder interfaces have been - modified to include an optional `$context` array parameter. - * The XML Root name can now be configured with the `xml_root_name` - parameter in the context option to the `XmlEncoder`. - * Options to `json_encode` and `json_decode` can be passed through - the context options of `JsonEncode` and `JsonDecode` encoder/decoders. - 2.1.0 ----- diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainDecoder.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainDecoder.php index 6ece3b2205b9cae65df49dac4a94ea3938661174..f555c6a8c98268bf51169a673b269512c2ac616e 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainDecoder.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainDecoder.php @@ -34,9 +34,9 @@ public function __construct(array $decoders = array()) /** * {@inheritdoc} */ - final public function decode($data, $format, array $context = array()) + final public function decode($data, $format) { - return $this->getDecoder($format)->decode($data, $format, $context); + return $this->getDecoder($format)->decode($data, $format); } /** diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainEncoder.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainEncoder.php index bd10a2ad412a265a4b370f892927773ce6f6f4a4..ebb81efb9ff363ce2478caef1cd810a2e2923aba 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainEncoder.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainEncoder.php @@ -35,9 +35,9 @@ public function __construct(array $encoders = array()) /** * {@inheritdoc} */ - final public function encode($data, $format, array $context = array()) + final public function encode($data, $format) { - return $this->getEncoder($format)->encode($data, $format, $context); + return $this->getEncoder($format)->encode($data, $format); } /** diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/DecoderInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/DecoderInterface.php index ffd221fe8d58b64f090c63969c4cb22ffcdee938..e95271f740b01eef3d08a57e41877b0fbf9a5e9c 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/DecoderInterface.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/DecoderInterface.php @@ -23,11 +23,10 @@ interface DecoderInterface * * @param scalar $data Data to decode * @param string $format Format name - * @param array $context options that decoders have access to. * * @return mixed */ - public function decode($data, $format, array $context = array()); + public function decode($data, $format); /** * Checks whether the serializer can decode from given format diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/EncoderInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/EncoderInterface.php index 2290db7f50d853610da5e908b5c446ebffe6dca9..4a68ad3fe9ea0510f44018fe0081e976f3007dda 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/EncoderInterface.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/EncoderInterface.php @@ -23,11 +23,10 @@ interface EncoderInterface * * @param mixed $data Data to encode * @param string $format Format name - * @param array $context options that normalizers/encoders have access to. * * @return scalar */ - public function encode($data, $format, array $context = array()); + public function encode($data, $format); /** * Checks whether the serializer can encode to given format diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonDecode.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonDecode.php index e7cd9e073da5640559f6a9c11671e654dc058a70..7ed8039eed878be04f7e04ecb907414b7a2225c6 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -21,7 +21,6 @@ class JsonDecode implements DecoderInterface private $associative; private $recursionDepth; private $lastError = JSON_ERROR_NONE; - protected $serializer; public function __construct($associative = false, $depth = 512) { @@ -49,20 +48,9 @@ public function getLastError() * * @return mixed */ - public function decode($data, $format, array $context = array()) + public function decode($data, $format) { - $context = $this->resolveContext($context); - - $associative = $context['json_decode_associative']; - $recursionDepth = $context['json_decode_recursion_depth']; - $options = $context['json_decode_options']; - - if (version_compare(PHP_VERSION, '5.4.0') >= 0) { - $decodedData = json_decode($data, $associative, $recursionDepth, $options); - } else { - $decodedData = json_decode($data, $associative, $recursionDepth); - } - + $decodedData = json_decode($data, $this->associative, $this->recursionDepth); $this->lastError = json_last_error(); return $decodedData; @@ -75,21 +63,4 @@ public function supportsDecoding($format) { return JsonEncoder::FORMAT === $format; } - - /** - * Merge the default options of the Json Decoder with the passed context. - * - * @param array $context - * @return array - */ - private function resolveContext(array $context) - { - $defaultOptions = array( - 'json_decode_associative' => $this->associative, - 'json_decode_recursion_depth' => $this->recursionDepth, - 'json_decode_options' => 0 - ); - - return array_merge($defaultOptions, $context); - } } diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncode.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncode.php index 4e0de3ed75890ce4e89b178f46321a79c3ef35fb..280b8a9733386b336c32230e1129d6407cc7d227 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -41,13 +41,14 @@ public function getLastError() /** * Encodes PHP data to a JSON string * - * {@inheritdoc} + * @param mixed $data + * @param string $format + * + * @return string */ - public function encode($data, $format, array $context = array()) + public function encode($data, $format) { - $context = $this->resolveContext($context); - - $encodedJson = json_encode($data, $context['json_encode_options']); + $encodedJson = json_encode($data, $this->options); $this->lastError = json_last_error(); return $encodedJson; @@ -60,15 +61,4 @@ public function supportsEncoding($format) { return JsonEncoder::FORMAT === $format; } - - /** - * Merge default json encode options with context. - * - * @param array $context - * @return array - */ - private function resolveContext(array $context = array()) - { - return array_merge(array('json_encode_options' => $this->options), $context); - } } diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncoder.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncoder.php index 02b179bc91a66a904dbc18a372e42505a883fcbf..73918b70516a7d342a429d31596a6c96adcc1f0a 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncoder.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncoder.php @@ -59,17 +59,17 @@ public function getLastDecodingError() /** * {@inheritdoc} */ - public function encode($data, $format, array $context = array()) + public function encode($data, $format) { - return $this->encodingImpl->encode($data, self::FORMAT, $context); + return $this->encodingImpl->encode($data, self::FORMAT); } /** * {@inheritdoc} */ - public function decode($data, $format, array $context = array()) + public function decode($data, $format) { - return $this->decodingImpl->decode($data, self::FORMAT, $context); + return $this->decodingImpl->decode($data, self::FORMAT); } /** diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/XmlEncoder.php index 909b3cefe7b4b8615733b164e638a885113a1f5a..11de50af08aa0ad9022d5e2c81899290deef9246 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -26,36 +26,24 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec private $format; private $rootNodeName = 'response'; - /** - * Construct new XmlEncoder and allow to change the root node element name. - * - * @param string $rootNodeName - */ - public function __construct($rootNodeName = 'response') - { - $this->rootNodeName = $rootNodeName; - } - /** * {@inheritdoc} */ - public function encode($data, $format, array $context = array()) + public function encode($data, $format) { if ($data instanceof \DOMDocument) { return $data->saveXML(); } - $xmlRootNodeName = $this->resolveXmlRootName($context); - $this->dom = new \DOMDocument(); $this->format = $format; if (null !== $data && !is_scalar($data)) { - $root = $this->dom->createElement($xmlRootNodeName); + $root = $this->dom->createElement($this->rootNodeName); $this->dom->appendChild($root); - $this->buildXml($root, $data, $xmlRootNodeName); + $this->buildXml($root, $data); } else { - $this->appendNode($this->dom, $data, $xmlRootNodeName); + $this->appendNode($this->dom, $data, $this->rootNodeName); } return $this->dom->saveXML(); @@ -64,7 +52,7 @@ public function encode($data, $format, array $context = array()) /** * {@inheritdoc} */ - public function decode($data, $format, array $context = array()) + public function decode($data, $format) { $internalErrors = libxml_use_internal_errors(true); $disableEntities = libxml_disable_entity_loader(true); @@ -281,13 +269,12 @@ private function parseXml($node) * * @param DOMNode $parentNode * @param array|object $data data - * @param string $xmlRootNodeName * * @return Boolean * * @throws UnexpectedValueException */ - private function buildXml($parentNode, $data, $xmlRootNodeName) + private function buildXml($parentNode, $data) { $append = true; @@ -323,24 +310,21 @@ private function buildXml($parentNode, $data, $xmlRootNodeName) return $append; } - if (is_object($data)) { $data = $this->serializer->normalize($data, $this->format); if (null !== $data && !is_scalar($data)) { - return $this->buildXml($parentNode, $data, $xmlRootNodeName); + return $this->buildXml($parentNode, $data); } - // top level data object was normalized into a scalar if (!$parentNode->parentNode->parentNode) { $root = $parentNode->parentNode; $root->removeChild($parentNode); - return $this->appendNode($root, $data, $xmlRootNodeName); + return $this->appendNode($root, $data, $this->rootNodeName); } return $this->appendNode($parentNode, $data, 'data'); } - throw new UnexpectedValueException('An unexpected value could not be serialized: '.var_export($data, true)); } @@ -392,7 +376,7 @@ private function needsCdataWrapping($val) private function selectNodeType($node, $val) { if (is_array($val)) { - return $this->buildXml($node, $val, null); + return $this->buildXml($node, $val); } elseif ($val instanceof \SimpleXMLElement) { $child = $this->dom->importNode(dom_import_simplexml($val), true); $node->appendChild($child); @@ -415,15 +399,4 @@ private function selectNodeType($node, $val) return true; } - - /** - * Get real XML root node name, taking serializer options into account. - */ - private function resolveXmlRootName(array $context = array()) - { - return isset($context['xml_root_node_name']) - ? $context['xml_root_node_name'] - : $this->rootNodeName; - } - } diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/LICENSE b/core/vendor/symfony/serializer/Symfony/Component/Serializer/LICENSE index 88a57f8d8da49126c6f7d225d567ad216ace4d83..cdffe7aebc04acd5c2b9c3042a0923d8e8f31998 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/LICENSE +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2013 Fabien Potencier +Copyright (c) 2004-2012 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php index 0ebe00fda54f54452e9c2486e24ee05c553b8386..4510fa0b8006d655de4aa9e699411bcfb5d39f84 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php @@ -19,18 +19,18 @@ class CustomNormalizer extends SerializerAwareNormalizer implements NormalizerIn /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = array()) + public function normalize($object, $format = null) { - return $object->normalize($this->serializer, $format, $context); + return $object->normalize($this->serializer, $format); } /** * {@inheritdoc} */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null) { $object = new $class; - $object->denormalize($this->serializer, $data, $format, $context); + $object->denormalize($this->serializer, $data, $format); return $object; } diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php index 5a1b4c196b59418e709fa20c9020e51456d4f2a3..3f3bf883238dd09002f387acb0fabdf900325a30 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php @@ -32,7 +32,6 @@ interface DenormalizableInterface * @param array|scalar $data The data from which to re-create the object. * @param string|null $format The format is optionally given to be able to denormalize differently * based on different input formats. - * @param array $context options for denormalizing */ - public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()); + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null); } diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php index 1a5ff93f751de757b1052f39728cfc47103ddb11..384f9febb66832e73eceefc2100ce7651ba405ee 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php @@ -24,11 +24,10 @@ interface DenormalizerInterface * @param mixed $data data to restore * @param string $class the expected class to instantiate * @param string $format format the given data was extracted from - * @param array $context options available to the denormalizer * * @return object */ - public function denormalize($data, $class, $format = null, array $context = array()); + public function denormalize($data, $class, $format = null); /** * Checks whether the given class is supported for denormalization by this normalizer diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index 63e7a1dea91eff470a9c3a172d012aaa8c9eb242..2c5f1b3e874dfe890ee3c09f3a094cea5805a45c 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -69,7 +69,7 @@ public function setIgnoredAttributes(array $ignoredAttributes) /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = array()) + public function normalize($object, $format = null) { $reflectionObject = new \ReflectionObject($object); $reflectionMethods = $reflectionObject->getMethods(\ReflectionMethod::IS_PUBLIC); @@ -101,7 +101,7 @@ public function normalize($object, $format = null, array $context = array()) /** * {@inheritdoc} */ - public function denormalize($data, $class, $format = null, array $context = array()) + public function denormalize($data, $class, $format = null) { $reflectionClass = new \ReflectionClass($class); $constructor = $reflectionClass->getConstructor(); diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php index 07c3a4a8dd8e81011ed325124b54dc6df47bff0e..fb77a836d8d908482262e4b3d866b602ee216953 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php @@ -31,9 +31,8 @@ interface NormalizableInterface * can use it to normalize objects contained within this object. * @param string|null $format The format is optionally given to be able to normalize differently * based on different output formats. - * @param array $context Options for normalizing this object * * @return array|scalar */ - public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()); + public function normalize(NormalizerInterface $normalizer, $format = null); } diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php index 744307a2ba37d4ebf11d01966031f1c56c628118..f0915db2b45300efa14d19e3387e6f7fa11c3cbc 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php @@ -23,11 +23,10 @@ interface NormalizerInterface * * @param object $object object to normalize * @param string $format format the normalization result will be encoded as - * @param array $context Context options for the normalizer * * @return array|scalar */ - public function normalize($object, $format = null, array $context = array()); + public function normalize($object, $format = null); /** * Checks whether the given class is supported for normalization by this normalizer diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php index ab6fd58b5fde6714383e165aec721bc530ac1d31..cad6963b164f36063ea6cfd2c79dffa22343a5d5 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php @@ -39,8 +39,8 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz { protected $encoder; protected $decoder; - protected $normalizers = array(); - protected $normalizerCache = array(); + protected $normalizers = array(); + protected $normalizerCache = array(); protected $denormalizerCache = array(); public function __construct(array $normalizers = array(), array $encoders = array()) @@ -72,58 +72,58 @@ public function __construct(array $normalizers = array(), array $encoders = arra /** * {@inheritdoc} */ - final public function serialize($data, $format, array $context = array()) + final public function serialize($data, $format) { if (!$this->supportsEncoding($format)) { throw new UnexpectedValueException('Serialization for the format '.$format.' is not supported'); } if ($this->encoder->needsNormalization($format)) { - $data = $this->normalize($data, $format, $context); + $data = $this->normalize($data, $format); } - return $this->encode($data, $format, $context); + return $this->encode($data, $format); } /** * {@inheritdoc} */ - final public function deserialize($data, $type, $format, array $context = array()) + final public function deserialize($data, $type, $format) { if (!$this->supportsDecoding($format)) { throw new UnexpectedValueException('Deserialization for the format '.$format.' is not supported'); } - $data = $this->decode($data, $format, $context); + $data = $this->decode($data, $format); - return $this->denormalize($data, $type, $format, $context); + return $this->denormalize($data, $type, $format); } /** * {@inheritdoc} */ - public function normalize($data, $format = null, array $context = array()) + public function normalize($data, $format = null) { if (null === $data || is_scalar($data)) { return $data; } if (is_object($data) && $this->supportsNormalization($data, $format)) { - return $this->normalizeObject($data, $format, $context); + return $this->normalizeObject($data, $format); } if ($data instanceof \Traversable) { $normalized = array(); foreach ($data as $key => $val) { - $normalized[$key] = $this->normalize($val, $format, $context); + $normalized[$key] = $this->normalize($val, $format); } return $normalized; } if (is_object($data)) { - return $this->normalizeObject($data, $format, $context); + return $this->normalizeObject($data, $format); } if (is_array($data)) { foreach ($data as $key => $val) { - $data[$key] = $this->normalize($val, $format, $context); + $data[$key] = $this->normalize($val, $format); } return $data; @@ -134,9 +134,9 @@ public function normalize($data, $format = null, array $context = array()) /** * {@inheritdoc} */ - public function denormalize($data, $type, $format = null, array $context = array()) + public function denormalize($data, $type, $format = null) { - return $this->denormalizeObject($data, $type, $format, $context); + return $this->denormalizeObject($data, $type, $format); } /** @@ -202,17 +202,17 @@ private function getDenormalizer($data, $type, $format = null) /** * {@inheritdoc} */ - final public function encode($data, $format, array $context = array()) + final public function encode($data, $format) { - return $this->encoder->encode($data, $format, $context); + return $this->encoder->encode($data, $format); } /** * {@inheritdoc} */ - final public function decode($data, $format, array $context = array()) + final public function decode($data, $format) { - return $this->decoder->decode($data, $format, $context); + return $this->decoder->decode($data, $format); } /** @@ -220,14 +220,13 @@ final public function decode($data, $format, array $context = array()) * * @param object $object object to normalize * @param string $format format name, present to give the option to normalizers to act differently based on formats - * @param array $context The context data for this particular normalization * * @return array|scalar * * @throws LogicException * @throws UnexpectedValueException */ - private function normalizeObject($object, $format = null, array $context = array()) + private function normalizeObject($object, $format = null) { if (!$this->normalizers) { throw new LogicException('You must register at least one normalizer to be able to normalize objects.'); @@ -235,14 +234,14 @@ private function normalizeObject($object, $format = null, array $context = array $class = get_class($object); if (isset($this->normalizerCache[$class][$format])) { - return $this->normalizerCache[$class][$format]->normalize($object, $format, $context); + return $this->normalizerCache[$class][$format]->normalize($object, $format); } foreach ($this->normalizers as $normalizer) { if ($normalizer->supportsNormalization($object, $format)) { $this->normalizerCache[$class][$format] = $normalizer; - return $normalizer->normalize($object, $format, $context); + return $normalizer->normalize($object, $format); } } @@ -255,28 +254,27 @@ private function normalizeObject($object, $format = null, array $context = array * @param mixed $data data to restore * @param string $class the expected class to instantiate * @param string $format format name, present to give the option to normalizers to act differently based on formats - * @param array $context The context data for this particular denormalization * * @return object * * @throws LogicException * @throws UnexpectedValueException */ - private function denormalizeObject($data, $class, $format = null, array $context = array()) + private function denormalizeObject($data, $class, $format = null) { if (!$this->normalizers) { throw new LogicException('You must register at least one normalizer to be able to denormalize objects.'); } if (isset($this->denormalizerCache[$class][$format])) { - return $this->denormalizerCache[$class][$format]->denormalize($data, $class, $format, $context); + return $this->denormalizerCache[$class][$format]->denormalize($data, $class, $format); } foreach ($this->normalizers as $normalizer) { if ($normalizer->supportsDenormalization($data, $class, $format)) { $this->denormalizerCache[$class][$format] = $normalizer; - return $normalizer->denormalize($data, $class, $format, $context); + return $normalizer->denormalize($data, $class, $format); } } diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/SerializerInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/SerializerInterface.php index d196d780a95be8ef55789cadeec0820523ea15bd..143179fe7a313481342bb0b54fec3ce34def77be 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/SerializerInterface.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/SerializerInterface.php @@ -21,13 +21,12 @@ interface SerializerInterface /** * Serializes data in the appropriate format * - * @param mixed $data any data - * @param string $format format name - * @param array $context options normalizers/encoders have access to + * @param mixed $data any data + * @param string $format format name * * @return string */ - public function serialize($data, $format, array $context = array()); + public function serialize($data, $format); /** * Deserializes data into the given type. @@ -35,9 +34,8 @@ public function serialize($data, $format, array $context = array()); * @param mixed $data * @param string $type * @param string $format - * @param array $context * * @return object */ - public function deserialize($data, $type, $format, array $context = array()); + public function deserialize($data, $type, $format); } diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php deleted file mode 100644 index c2f60728d96de424f190138cf32f398de8e830ca..0000000000000000000000000000000000000000 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Serializer\Tests\Encoder; - -use Symfony\Component\Serializer\Encoder\JsonEncoder; -use Symfony\Component\Serializer\Serializer; -use Symfony\Component\Serializer\Normalizer\CustomNormalizer; - -class JsonEncoderTest extends \PHPUnit_Framework_TestCase -{ - protected function setUp() - { - $this->encoder = new JsonEncoder; - $this->serializer = new Serializer(array(new CustomNormalizer()), array('json' => new JsonEncoder())); - } - - public function testEncodeScalar() - { - $obj = new \stdClass; - $obj->foo = "foo"; - - $expected = '{"foo":"foo"}'; - - $this->assertEquals($expected, $this->encoder->encode($obj, 'json')); - } - - public function testComplexObject() - { - $obj = $this->getObject(); - - $expected = $this->getJsonSource(); - - $this->assertEquals($expected, $this->encoder->encode($obj, 'json')); - } - - public function testOptions() - { - $context = array('json_encode_options' => JSON_NUMERIC_CHECK); - - $arr = array(); - $arr['foo'] = "3"; - - $expected = '{"foo":3}'; - - $this->assertEquals($expected, $this->serializer->serialize($arr, 'json', $context)); - - $arr = array(); - $arr['foo'] = "3"; - - $expected = '{"foo":"3"}'; - - $this->assertEquals($expected, $this->serializer->serialize($arr, 'json'), 'Context should not be persistent'); - } - - - protected function getJsonSource() - { - return '{"foo":"foo","bar":["a","b"],"baz":{"key":"val","key2":"val","A B":"bar","item":[{"title":"title1"},{"title":"title2"}],"Barry":{"FooBar":{"Baz":"Ed","@id":1}}},"qux":"1"}'; - } - - protected function getObject() - { - $obj = new \stdClass; - $obj->foo = 'foo'; - $obj->bar = array('a', 'b'); - $obj->baz = array('key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => array(array('title' => 'title1'), array('title' => 'title2')), 'Barry' => array('FooBar' => array('Baz' => 'Ed', '@id' => 1))); - $obj->qux = "1"; - - return $obj; - } -} diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php index b23d4c79390977d29ece3017299e02f9369a8644..23cb0217a6be25a238bfb378c603f359c5531cd7 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php @@ -184,23 +184,6 @@ public function testEncode() $this->assertEquals($source, $this->encoder->encode($obj, 'xml')); } - public function testEncodeSerializerXmlRootNodeNameOption() - { - $options = array('xml_root_node_name' => 'test'); - $this->encoder = new XmlEncoder; - $serializer = new Serializer(array(), array('xml' => new XmlEncoder())); - $this->encoder->setSerializer($serializer); - - $array = array( - 'person' => array('@gender' => 'M', '#' => 'Peter'), - ); - - $expected = '<?xml version="1.0"?>'."\n". - '<test><person gender="M">Peter</person></test>'."\n"; - - $this->assertEquals($expected, $serializer->serialize($array, 'xml', $options)); - } - public function testDecode() { $source = $this->getXmlSource(); diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php index 09b8a5281216d7d7798cf3e8ba8c4dfb899ada9d..468d44487645ecd3531c0f4e80f8f208ee277a7e 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php @@ -17,7 +17,7 @@ class DenormalizableDummy implements DenormalizableInterface { - public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null) { } diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php index 6b33e84374405bf2337b377abce7a38ba37af88e..cdcf510df0a2549d2022f8bfd743fd9930640e3b 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php @@ -23,7 +23,7 @@ class Dummy implements NormalizableInterface, DenormalizableInterface public $baz; public $qux; - public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()) + public function normalize(NormalizerInterface $normalizer, $format = null) { return array( 'foo' => $this->foo, @@ -33,7 +33,7 @@ public function normalize(NormalizerInterface $normalizer, $format = null, array ); } - public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null) { $this->foo = $data['foo']; $this->bar = $data['bar']; diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php index 3ac2fe364f9a636c52020cf47137325b3aaa3944..ba1f924e015fac0931ba39ba49ba3c1e2bc41b63 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php @@ -18,7 +18,7 @@ class NormalizableTraversableDummy extends TraversableDummy implements NormalizableInterface, DenormalizableInterface { - public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()) + public function normalize(NormalizerInterface $normalizer, $format = null) { return array( 'foo' => 'normalizedFoo', @@ -26,7 +26,7 @@ public function normalize(NormalizerInterface $normalizer, $format = null, array ); } - public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null) { return array( 'foo' => 'denormalizedFoo', diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php index e9db23882b58f5975a6447dc25fa93e9017aeb6b..1b0516a4174eb5f2945ebc6493436bbf7fc13a3c 100644 --- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php +++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php @@ -21,12 +21,12 @@ class ScalarDummy implements NormalizableInterface, DenormalizableInterface public $foo; public $xmlFoo; - public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()) + public function normalize(NormalizerInterface $normalizer, $format = null) { return $format === 'xml' ? $this->xmlFoo : $this->foo; } - public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()) + public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null) { if ($format === 'xml') { $this->xmlFoo = $data;