[Form] Always normalize CRLF and CR to LF in TextareaType#62841
Conversation
alexandre-daubois
commented
Dec 23, 2025
| Q | A |
|---|---|
| Branch? | 6.4 |
| Bug fix? | yes |
| New feature? | no |
| Deprecations? | no |
| Issues | Fix #62611 |
| License | MIT |
142984d to
ff5bd06
Compare
ff5bd06 to
a17f844
Compare
|
Thank you @alexandre-daubois. |
|
@alexandre-daubois @nicolas-grekas This is a breaking change, it changes behaviour, unfortunately our test suite didn't catch this and this broke live environments. |
|
Yes same here, such changes need more attention and between releases. |
|
Can you explain further how this breaks your app and the use case to understand what we didn't see, please? |
|
For me it was saving a textarea field (multiline) to the database. until the change of that PR it saved \r\n to the TEXT field of the database. Now its only a \n. |
|
We have a custom form type for a multi-email input (on top of textarea) which uses ";" as delimiter at db level and on the frontend it was rendered with "\r\n". A callback transformer would do the transformation between ";" and "\r\n". Symfony changing "\r\n" to "\n" all of sudden caused the transformer to not transform the values and as such it broke sending out emails. We've ever since fixed this but this is a BC break and shouldn't have been done like this imo. |
|
@faizanakram99 Can you please try out the fix I propose in #63154? |
…ng submitted newlines (xabbuh) This PR was merged into the 6.4 branch. Discussion ---------- [Form] don't skip custom view transformers while normalizing submitted newlines | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #62841 (comment) | License | MIT Commits ------- 8348420 don't skip custom view transformers while normalizing submitted newlines
Sorry, we already made adjustments to our code, it is difficult to get back to previous state again and check against existing data. |
nvm, I am testing it. Will report the results. UPDATE: Sorry couldn't get into previous state. |
|
For my case I also made fixes to the application. But with the new 7.4.4 release where the fix was implemented, i still get only "\n" as new line and not "\r\n" as before 7.4.3. |
I think that’s expected because it’s precisely the bugfix that was included in 7.4.3. |