"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php" between
symfony-4.4.14.tar.gz and symfony-4.4.15.tar.gz

About: Symfony is a web application framework for PHP projects. Source code (4.4 series).

AbstractNormalizer.php  (symfony-4.4.14):AbstractNormalizer.php  (symfony-4.4.15)
skipping to change at line 319 skipping to change at line 319
* @param object $object * @param object $object
* @param string|null $format * @param string|null $format
* @param array $context * @param array $context
* *
* @return mixed * @return mixed
* *
* @throws CircularReferenceException * @throws CircularReferenceException
*/ */
protected function handleCircularReference($object/*, string $format = null, array $context = []*/) protected function handleCircularReference($object/*, string $format = null, array $context = []*/)
{ {
if (\func_num_args() < 2 && __CLASS__ !== static::class && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface) { if (\func_num_args() < 2 && __CLASS__ !== static::class && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface && !$this instanceof \Mockery\MockI nterface) {
@trigger_error(sprintf('The "%s()" method will have two new "string $format = null" and "array $context = []" arguments in version 5.0, not defining it is deprecated since Symfony 4.2.', __METHOD__), \E_USER_DEPRECATED); @trigger_error(sprintf('The "%s()" method will have two new "string $format = null" and "array $context = []" arguments in version 5.0, not defining it is deprecated since Symfony 4.2.', __METHOD__), \E_USER_DEPRECATED);
} }
$format = \func_num_args() > 1 ? func_get_arg(1) : null; $format = \func_num_args() > 1 ? func_get_arg(1) : null;
$context = \func_num_args() > 2 ? func_get_arg(2) : []; $context = \func_num_args() > 2 ? func_get_arg(2) : [];
$circularReferenceHandler = $context[self::CIRCULAR_REFERENCE_HANDLER] ? ? $this->defaultContext[self::CIRCULAR_REFERENCE_HANDLER] ?? $this->circularRefe renceHandler; $circularReferenceHandler = $context[self::CIRCULAR_REFERENCE_HANDLER] ? ? $this->defaultContext[self::CIRCULAR_REFERENCE_HANDLER] ?? $this->circularRefe renceHandler;
if ($circularReferenceHandler) { if ($circularReferenceHandler) {
return $circularReferenceHandler($object, $format, $context); return $circularReferenceHandler($object, $format, $context);
} }
throw new CircularReferenceException(sprintf('A circular reference has b een detected when serializing the object of class "%s" (configured limit: %d).', \get_class($object), $this->circularReferenceLimit)); throw new CircularReferenceException(sprintf('A circular reference has b een detected when serializing the object of class "%s" (configured limit: %d).', \get_class($object), $context[self::CIRCULAR_REFERENCE_LIMIT] ?? $this->default Context[self::CIRCULAR_REFERENCE_LIMIT] ?? $this->circularReferenceLimit));
} }
/** /**
* Gets attributes to normalize using groups. * Gets attributes to normalize using groups.
* *
* @param string|object $classOrObject * @param string|object $classOrObject
* @param bool $attributesAsString If false, return an array of {@l ink AttributeMetadataInterface} * @param bool $attributesAsString If false, return an array of {@l ink AttributeMetadataInterface}
* *
* @throws LogicException if the 'allow_extra_attributes' context variable i s false and no class metadata factory is provided * @throws LogicException if the 'allow_extra_attributes' context variable i s false and no class metadata factory is provided
* *
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)