Skip to content

Commit

Permalink
minor #47598 [FrameworkBundle] Deprecate "legacy_error_messages" form…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
fabpot committed Sep 18, 2022
2 parents 77538c8 + bfcc49a commit f951250
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CHANGELOG
`workflow.state_machine`
* Add `rate_limiter` configuration option to `messenger.transport` to allow rate limited transports using the RateLimiter component
* Remove `@internal` tag from secret vaults to allow them to be used directly outside the framework bundle and custom vaults to be added
* Deprecate "framework.form.legacy_error_messages" config node

6.1
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ private function addFormSection(ArrayNodeDefinition $rootNode, callable $enableI
->scalarNode('field_name')->defaultValue('_token')->end()
->end()
->end()
// to be deprecated in Symfony 6.1
->booleanNode('legacy_error_messages')->end()
->booleanNode('legacy_error_messages')
->setDeprecated('symfony/framework-bundle', '6.2')
->end()
->end()
->end()
->end()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

$container->loadFromExtension('framework', [
'http_method_override' => false,
'form' => [
'legacy_error_messages' => false,
],
'session' => [
'storage_factory_id' => 'session.storage.factory.native',
'handler_id' => null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

<framework:config http-method-override="false">
<framework:csrf-protection />
<framework:form legacy-error-messages="false" />
<framework:session storage-factory-id="session.storage.factory.native" />
</framework:config>
</container>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
<framework:config http-method-override="false">
<framework:csrf-protection field-name="_custom" />
<framework:session storage-factory-id="session.storage.factory.native" />
<framework:form legacy-error-messages="false" />
</framework:config>
</container>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

<framework:config http-method-override="false">
<framework:csrf-protection field-name="_custom_form" />
<framework:form legacy-error-messages="false" />
<framework:session storage-factory-id="session.storage.factory.native" />
</framework:config>
</container>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">

<framework:config http-method-override="false">
<framework:form enabled="true" legacy-error-messages="false" />
<framework:form enabled="true" />
<framework:session storage-factory-id="session.storage.factory.native" handler-id="null"/>
</framework:config>
</container>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">

<framework:config http-method-override="false">
<framework:form enabled="true" legacy-error-messages="false">
<framework:form enabled="true">
<framework:csrf-protection enabled="false" />
</framework:form>
</framework:config>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<framework:enabled-locale>fr</framework:enabled-locale>
<framework:enabled-locale>en</framework:enabled-locale>
<framework:csrf-protection />
<framework:form legacy-error-messages="false">
<framework:form>
<framework:csrf-protection field-name="_csrf"/>
</framework:form>
<framework:esi enabled="true" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
framework:
http_method_override: false
form:
legacy_error_messages: false
session:
storage_factory_id: session.storage.factory.native
handler_id: null

0 comments on commit f951250

Please sign in to comment.