Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f951250

Browse files
committed
minor #47598 [FrameworkBundle] Deprecate "legacy_error_messages" form config node (HeahDude)
This PR was merged into the 6.2 branch. Discussion ---------- [FrameworkBundle] Deprecate "legacy_error_messages" form config node | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | yes | Tickets | ~ | License | MIT | Doc PR | ~ Commits ------- bfcc49a [FrameworkBundle] Deprecate "legacy_error_messages" form config node
2 parents 77538c8 + bfcc49a commit f951250

File tree

10 files changed

+7
-13
lines changed

10 files changed

+7
-13
lines changed

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ CHANGELOG
1818
`workflow.state_machine`
1919
* Add `rate_limiter` configuration option to `messenger.transport` to allow rate limited transports using the RateLimiter component
2020
* Remove `@internal` tag from secret vaults to allow them to be used directly outside the framework bundle and custom vaults to be added
21+
* Deprecate "framework.form.legacy_error_messages" config node
2122

2223
6.1
2324
---

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,9 @@ private function addFormSection(ArrayNodeDefinition $rootNode, callable $enableI
237237
->scalarNode('field_name')->defaultValue('_token')->end()
238238
->end()
239239
->end()
240-
// to be deprecated in Symfony 6.1
241-
->booleanNode('legacy_error_messages')->end()
240+
->booleanNode('legacy_error_messages')
241+
->setDeprecated('symfony/framework-bundle', '6.2')
242+
->end()
242243
->end()
243244
->end()
244245
->end()

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/form_default_csrf.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
$container->loadFromExtension('framework', [
44
'http_method_override' => false,
5-
'form' => [
6-
'legacy_error_messages' => false,
7-
],
85
'session' => [
96
'storage_factory_id' => 'session.storage.factory.native',
107
'handler_id' => null,

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
<framework:config http-method-override="false">
1010
<framework:csrf-protection />
11-
<framework:form legacy-error-messages="false" />
1211
<framework:session storage-factory-id="session.storage.factory.native" />
1312
</framework:config>
1413
</container>

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_csrf_sets_field_name.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@
99
<framework:config http-method-override="false">
1010
<framework:csrf-protection field-name="_custom" />
1111
<framework:session storage-factory-id="session.storage.factory.native" />
12-
<framework:form legacy-error-messages="false" />
1312
</framework:config>
1413
</container>

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_csrf_under_form_sets_field_name.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
<framework:config http-method-override="false">
1010
<framework:csrf-protection field-name="_custom_form" />
11-
<framework:form legacy-error-messages="false" />
1211
<framework:session storage-factory-id="session.storage.factory.native" />
1312
</framework:config>
1413
</container>

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_default_csrf.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
88

99
<framework:config http-method-override="false">
10-
<framework:form enabled="true" legacy-error-messages="false" />
10+
<framework:form enabled="true" />
1111
<framework:session storage-factory-id="session.storage.factory.native" handler-id="null"/>
1212
</framework:config>
1313
</container>

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/form_no_csrf.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
88

99
<framework:config http-method-override="false">
10-
<framework:form enabled="true" legacy-error-messages="false">
10+
<framework:form enabled="true">
1111
<framework:csrf-protection enabled="false" />
1212
</framework:form>
1313
</framework:config>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<framework:enabled-locale>fr</framework:enabled-locale>
1111
<framework:enabled-locale>en</framework:enabled-locale>
1212
<framework:csrf-protection />
13-
<framework:form legacy-error-messages="false">
13+
<framework:form>
1414
<framework:csrf-protection field-name="_csrf"/>
1515
</framework:form>
1616
<framework:esi enabled="true" />
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
framework:
22
http_method_override: false
3-
form:
4-
legacy_error_messages: false
53
session:
64
storage_factory_id: session.storage.factory.native
75
handler_id: null

0 commit comments

Comments
 (0)