From cb850fef26af00920ebe5552f636fc9d6715133b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 6 Jun 2016 11:00:08 +0200 Subject: [PATCH] Fix merge --- .../Component/DependencyInjection/Dumper/PhpDumper.php | 2 +- .../Tests/Fixtures/php/services13.php | 8 ++++++++ .../Component/Serializer/Encoder/XmlEncoder.php | 2 +- .../Serializer/Normalizer/DenormalizableInterface.php | 6 +++--- .../Serializer/Normalizer/DenormalizerInterface.php | 6 +++--- .../Serializer/Normalizer/NormalizableInterface.php | 8 ++++---- .../Serializer/Normalizer/NormalizerInterface.php | 8 ++++---- src/Symfony/Component/Serializer/Serializer.php | 4 ---- .../Component/Serializer/SerializerInterface.php | 10 +++++----- src/Symfony/Component/Yaml/Tests/InlineTest.php | 2 -- 10 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index de8c4dae42..aa1257d845 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -1268,7 +1268,7 @@ EOF; return true; } - if ($deep && !isset($visited[$argumentId]) && 'service_container' !== (string) $argument) { + if ($deep && !isset($visited[$argumentId]) && 'service_container' !== $argumentId) { $visited[$argumentId] = true; $service = $this->container->getDefinition($argumentId); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php index 0c33b7b3ea..f6038f3903 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php @@ -36,6 +36,14 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } + /** + * {@inheritdoc} + */ + public function compile() + { + throw new LogicException('You cannot compile a dumped frozen container.'); + } + /** * Gets the 'bar' service. * diff --git a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php index 94cff517dc..be6688bc3d 100644 --- a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -461,7 +461,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec * @param mixed $val * * @throws UnexpectedValueException - * + * * @return bool */ private function selectNodeType(\DOMNode $node, $val) diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php index 765a1c6567..b515611e78 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Normalizer; -use Symfony\Component\Serializer\Exception\Exception; +use Symfony\Component\Serializer\Exception\ExceptionInterface; /** * Defines the most basic interface a class must implement to be denormalizable. @@ -36,9 +36,9 @@ interface DenormalizableInterface * based on different input formats * @param array $context options for denormalizing * - * @return object + * @throws ExceptionInterface * - * @throws Exception + * @return object */ public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()); } diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php index 40c5890bd3..a544124f29 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Normalizer; -use Symfony\Component\Serializer\Exception\Exception; +use Symfony\Component\Serializer\Exception\ExceptionInterface; /** * Defines the interface of denormalizers. @@ -28,8 +28,8 @@ interface DenormalizerInterface * @param string $format format the given data was extracted from * @param array $context options available to the denormalizer * - * @throws Exception - * + * @throws ExceptionInterface + * * @return object */ public function denormalize($data, $class, $format = null, array $context = array()); diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php index b4718cd482..ac3edb680d 100644 --- a/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Normalizer; -use Symfony\Component\Serializer\Exception\Exception; +use Symfony\Component\Serializer\Exception\ExceptionInterface; /** * Defines the most basic interface a class must implement to be normalizable. @@ -35,9 +35,9 @@ interface NormalizableInterface * based on different output formats. * @param array $context Options for normalizing this object * - * @throws Exception - * - * @return array|string|bool|int|float|null + * @throws ExceptionInterface + * + * @return array|scalar */ public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()); } diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php index 0ce5b3aef2..333397044b 100644 --- a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Normalizer; -use Symfony\Component\Serializer\Exception\Exception; +use Symfony\Component\Serializer\Exception\ExceptionInterface; /** * Defines the interface of normalizers. @@ -27,9 +27,9 @@ interface NormalizerInterface * @param string $format format the normalization result will be encoded as * @param array $context Context options for the normalizer * - * @throws Exception - * - * @return array|string|bool|int|float|null + * @throws ExceptionInterface + * + * @return array|scalar */ public function normalize($object, $format = null, array $context = array()); diff --git a/src/Symfony/Component/Serializer/Serializer.php b/src/Symfony/Component/Serializer/Serializer.php index d95873800e..0259bfeda6 100644 --- a/src/Symfony/Component/Serializer/Serializer.php +++ b/src/Symfony/Component/Serializer/Serializer.php @@ -183,8 +183,6 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz * @param string $format format name, present to give the option to normalizers to act differently based on formats * * @return NormalizerInterface|null - * - * @throws RuntimeException */ private function getNormalizer($data, $format) { @@ -203,8 +201,6 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz * @param string $format format name, present to give the option to normalizers to act differently based on formats * * @return DenormalizerInterface|null - * - * @throws RuntimeException */ private function getDenormalizer($data, $class, $format) { diff --git a/src/Symfony/Component/Serializer/SerializerInterface.php b/src/Symfony/Component/Serializer/SerializerInterface.php index ed2e71c2cd..7d1fb2e465 100644 --- a/src/Symfony/Component/Serializer/SerializerInterface.php +++ b/src/Symfony/Component/Serializer/SerializerInterface.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer; -use Symfony\Component\Serializer\Exception\Exception; +use Symfony\Component\Serializer\Exception\ExceptionInterface; /** * Defines the interface of the Serializer. @@ -27,8 +27,8 @@ interface SerializerInterface * @param string $format format name * @param array $context options normalizers/encoders have access to * - * @throws Exception - * + * @throws ExceptionInterface + * * @return string */ public function serialize($data, $format, array $context = array()); @@ -41,8 +41,8 @@ interface SerializerInterface * @param string $format * @param array $context * - * @throws Exception - * + * @throws ExceptionInterface + * * @return object */ public function deserialize($data, $type, $format, array $context = array()); diff --git a/src/Symfony/Component/Yaml/Tests/InlineTest.php b/src/Symfony/Component/Yaml/Tests/InlineTest.php index 1fbd62f56e..0e03e36a87 100644 --- a/src/Symfony/Component/Yaml/Tests/InlineTest.php +++ b/src/Symfony/Component/Yaml/Tests/InlineTest.php @@ -398,8 +398,6 @@ class InlineTest extends \PHPUnit_Framework_TestCase array('[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', array('foo', '@foo.baz', array('%foo%' => 'foo is %foo%', 'bar' => '%foo%'), true, '@service_container')), - array('[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', array('foo', '@foo.baz', array('%foo%' => 'foo is %foo%', 'bar' => '%foo%'), true, '@service_container')), - array('{ foo: { bar: { 1: 2, baz: 3 } } }', array('foo' => array('bar' => array(1 => 2, 'baz' => 3)))), ); }