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 15c9261

Browse filesBrowse files
committed
Add deprecation
1 parent 8d689e6 commit 15c9261
Copy full SHA for 15c9261

File tree

14 files changed

+38
-13
lines changed
Filter options

14 files changed

+38
-13
lines changed

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+10-1
Original file line numberDiff line numberDiff line change
@@ -1230,11 +1230,20 @@ private function addPropertyInfoSection(ArrayNodeDefinition $rootNode, callable
12301230
->children()
12311231
->booleanNode('with_constructor_extractor')
12321232
->info('Registers the constructor extractor.')
1233-
->defaultFalse()
12341233
->end()
12351234
->end()
12361235
->end()
12371236
->end()
1237+
->validate()
1238+
->ifTrue(fn ($v) => $v['property_info']['enabled'] && !isset($v['property_info']['with_constructor_extractor']))
1239+
->then(function ($v) {
1240+
$v['property_info']['with_constructor_extractor'] = false;
1241+
1242+
trigger_deprecation('symfony/property-info', '7.3', 'Not setting the "with_constructor_extractor" option explicitly is deprecated because its default value will change in version 8.0.');
1243+
1244+
return $v;
1245+
})
1246+
->end()
12381247
;
12391248
}
12401249

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
+1-2
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,7 @@ protected static function getBundleDefaultConfig()
808808
],
809809
'property_info' => [
810810
'enabled' => !class_exists(FullStack::class),
811-
'with_constructor_extractor' => false,
812-
],
811+
] + (!class_exists(FullStack::class) ? ['with_constructor_extractor' => false] : []),
813812
'router' => [
814813
'enabled' => false,
815814
'default_uri' => null,

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php
+4-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@
7474
],
7575
],
7676
],
77-
'property_info' => true,
77+
'property_info' => [
78+
'enabled' => true,
79+
'with_constructor_extractor' => true,
80+
],
7881
'type_info' => true,
7982
'ide' => 'file%%link%%format',
8083
'request' => [

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/property_info.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/property_info.php
+1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
'php_errors' => ['log' => true],
88
'property_info' => [
99
'enabled' => true,
10+
'with_constructor_extractor' => false,
1011
],
1112
]);

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_auto_mapping.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/validation_auto_mapping.php
+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
'http_method_override' => false,
66
'handle_all_throwables' => true,
77
'php_errors' => ['log' => true],
8-
'property_info' => ['enabled' => true],
8+
'property_info' => [
9+
'enabled' => true,
10+
'with_constructor_extractor' => true,
11+
],
912
'validation' => [
1013
'email_validation_mode' => 'html5',
1114
'auto_mapping' => [

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml
+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</framework:default-context>
4545
</framework:named-serializer>
4646
</framework:serializer>
47-
<framework:property-info />
47+
<framework:property-info with-constructor-extractor="true" />
4848
<framework:type-info />
4949
<framework:json-encoder />
5050
</framework:config>

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/property_info.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/property_info.xml
+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<framework:config http-method-override="false" handle-all-throwables="true">
99
<framework:annotations enabled="false" />
1010
<framework:php-errors log="true" />
11-
<framework:property-info enabled="true" />
11+
<framework:property-info enabled="true" with-constructor-extractor="false" />
1212
</framework:config>
1313
</container>

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/validation_auto_mapping.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/validation_auto_mapping.xml
+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<framework:config http-method-override="false" handle-all-throwables="true">
77
<framework:annotations enabled="false" />
88
<framework:php-errors log="true" />
9-
<framework:property-info enabled="true" />
9+
<framework:property-info enabled="true" with-constructor-extractor="true" />
1010
<framework:validation email-validation-mode="html5">
1111
<framework:auto-mapping namespace="App\">
1212
<framework:service>foo</framework:service>

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml
+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ framework:
6464
default_context:
6565
enable_max_depth: false
6666
type_info: ~
67-
property_info: ~
67+
property_info:
68+
with_constructor_extractor: true
6869
ide: file%%link%%format
6970
request:
7071
formats:

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/property_info.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/property_info.yml
+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ framework:
66
log: true
77
property_info:
88
enabled: true
9+
with_constructor_extractor: false

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/validation_auto_mapping.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/validation_auto_mapping.yml
+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ framework:
44
handle_all_throwables: true
55
php_errors:
66
log: true
7-
property_info: { enabled: true }
7+
property_info:
8+
enabled: true
9+
with_constructor_extractor: true
810
validation:
911
email_validation_mode: html5
1012
auto_mapping:

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ApiAttributesTest/config.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ApiAttributesTest/config.yml
+3-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ framework:
55
serializer:
66
enabled: true
77
validation: true
8-
property_info: { enabled: true }
8+
property_info:
9+
enabled: true
10+
with_constructor_extractor: true

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/config.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/config.yml
+3-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ framework:
1515
translator: true
1616
validation: true
1717
serializer: true
18-
property_info: true
18+
property_info:
19+
enabled: true
20+
with_constructor_extractor: true
1921
csrf_protection: true
2022
form: true

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Serializer/config.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Serializer/config.yml
+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ framework:
1010
max_depth_handler: Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Serializer\MaxDepthHandler
1111
default_context:
1212
enable_max_depth: true
13-
property_info: { enabled: true }
13+
property_info:
14+
enabled: true
15+
with_constructor_extractor: true
1416

1517
services:
1618
serializer.alias:

0 commit comments

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