Commit b7a8ab3
committed
bug symfony#59829 [FrameworkBundle] Disable the keys normalization of the CSRF form field attributes (sukei)
This PR was merged into the 7.2 branch.
Discussion
----------
[FrameworkBundle] Disable the keys normalization of the CSRF form field attributes
| Q | A
| ------------- | ---
| Branch? | 7.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues |
| License | MIT
The form.csrf_protection.field_attr configuration node value should remain as-is when defined. The default behavior of the configuration component is to normalize keys, but in that specific cases, keys becomes HTML attributes and therefore should not be changed. This commit fix that behaviour for the specific node.
**Given**
```yaml
framework:
form:
csrf_protection:
field_attr: { 'data-example-attr': 'value }
```
**Before this patch**
```php
['field_attr' = ['data_example_attr' => 'value']]
```
**After this patch**
```php
['field_attr' = ['data-example-attr' => 'value']]
```
Commits
-------
e73f3bb [FrameworkBundle] Disable the keys normalization of the CSRF form field attributesFile tree
2 files changed
+17
-0
lines changed- src/Symfony/Bundle/FrameworkBundle
- DependencyInjection
- Tests/DependencyInjection
2 files changed
+17
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| 253 | + | |
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
699 | 699 | | |
700 | 700 | | |
701 | 701 | | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
702 | 718 | | |
703 | 719 | | |
704 | 720 | | |
| |||
0 commit comments