Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 14f5c30

Browse filesBrowse files
committed
Add deprecation notice
1 parent 0685b13 commit 14f5c30
Copy full SHA for 14f5c30

File tree

3 files changed

+10
-0
lines changed
Filter options

3 files changed

+10
-0
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php
+1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
service('serializer.mapping.class_discriminator_resolver')->ignoreOnInvalid(),
137137
null,
138138
[],
139+
false,
139140
])
140141

141142
->alias(PropertyNormalizer::class, 'serializer.normalizer.property')

‎src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ public function __construct(
5454
) {
5555
parent::__construct($classMetadataFactory, $nameConverter, $propertyTypeExtractor, $classDiscriminatorResolver, $objectClassResolver, $defaultContext);
5656
$this->allowNormalizationOfObjectsWithoutAnyGetters = $allowNormalizationOfObjectsWithoutAnyGetters;
57+
58+
if (func_num_args() < 7) {
59+
trigger_deprecation('symfony/serializer', '6.1', '$allowNormalizationOfObjectsWithoutAnyGetters parameter of %s::__construct() should be explicitly provided since the default value will change to `true` in symfony/serializer >=7.0', __CLASS__);
60+
}
5761
}
5862

5963
/**

‎src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php
+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\Serializer\Mapping\ClassDiscriminatorResolverInterface;
1717
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface;
1818
use Symfony\Component\Serializer\NameConverter\NameConverterInterface;
19+
use Symfony\Component\Uid\AbstractUid;
1920

2021
/**
2122
* Converts between objects and arrays by mapping properties.
@@ -49,6 +50,10 @@ public function __construct(
4950
) {
5051
parent::__construct($classMetadataFactory, $nameConverter, $propertyTypeExtractor, $classDiscriminatorResolver, $objectClassResolver, $defaultContext);
5152
$this->allowNormalizationOfObjectsWithoutAnyProperties = $allowNormalizationOfObjectsWithoutAnyProperties;
53+
54+
if (func_num_args() < 7) {
55+
trigger_deprecation('symfony/serializer', '6.1', '$allowNormalizationOfObjectsWithoutAnyProperties parameter of %s::__construct() should be explicitly provided since the default value will change to `true` in symfony/serializer >=7.0', __CLASS__);
56+
}
5257
}
5358

5459
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.