bug #29571 [Yaml] ensures that the mb_internal_encoding is reset to its initial value (Jörn Lang)
bug #29571 [Yaml] ensures that the mb_internal_encoding is reset to its initial value (Jörn Lang)

This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] ensures that the mb_internal_encoding is reset to its initial value

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

When `Symfony\Component\Yaml\Inline::parse` sets the internal encoding to ASCII and the method does an early return or throws an exception, the internal encoding would not be reset.
This Patch ensures the reset of the encoding by moving it into a finally block.

Commits
-------

56ab129b96 [Yaml] ensures that the mb_internal_encoding is reset to its initial value

Nyholm/symfony,jderusse/symfony,Nyholm/symfony,HeahDude/symfony,derrabus/symfony,ragboyjr/symfony,maidmaid/symfony,Slamdunk/symfony,docteurklein/symfony,zorn-v/symfony,HeahDude/symfony,ragboyjr/symfony,localheinz/symfony,chalasr/symfony,Slamdunk/symfony,sgehrig/symfony,vincentaubert/symfony,jvasseur/symfony,ragboyjr/symfony,jderusse/symfony,ro0NL/symfony,zorn-v/symfony,paradajozsef/symfony,sroze/symfony,oleg-andreyev/symfony,hhamon/symfony,garak/symfony,docteurklein/symfony,andrerom/symfony,shieldo/symfony,smatyas/symfony,shieldo/symfony,Koc/symfony,d-ph/symfony,voronkovich/symfony,Koc/symfony,mweimerskirch/symfony,teohhanhui/symfony,nicolas-grekas/symfony,andreia/symfony,pyrech/symfony,maidmaid/symfony,damienalexandre/symfony,fabpot/symfony,bendavies/symfony,ajgarlag/symfony,zorn-v/symfony,vincentaubert/symfony,zorn-v/symfony,symfony/symfony,Simperfit/symfony,hhamon/symfony,Simperfit/symfony,garak/symfony,frankdejonge/symfony,localheinz/symfony,maidmaid/symfony,arjenm/symfony,nicolas-grekas/symfony,jakzal/symfony,Tobion/symfony,hhamon/symfony,localheinz/symfony,ogizanagi/symfony,tgalopin/symfony,deguif/symfony,stof/symfony,Deamon/symfony,d-ph/symfony,joelwurtz/symfony,1ed/symfony,gnat42/symfony,mnapoli/symfony,tucksaun/symfony,bendavies/symfony,garak/symfony,sgehrig/symfony,stof/symfony,Koc/symfony,sroze/symfony,alekitto/symfony,ajgarlag/symfony,deguif/symfony,1ed/symfony,Deamon/symfony,curry684/symfony,ajgarlag/symfony,hhamon/symfony,chalasr/symfony,shieldo/symfony,zerkms/symfony,Taluu/symfony,mweimerskirch/symfony,stof/symfony,damienalexandre/symfony,ajgarlag/symfony,mpdude/symfony,romaricdrigon/symfony,ogizanagi/symfony,zerkms/symfony,gonzalovilaseca/symfony,mnapoli/symfony,andreia/symfony,curry684/symfony,mpdude/symfony,symfony/symfony,MatTheCat/symfony,xabbuh/symfony,ragboyjr/symfony,MatTheCat/symfony,zcodes/symfony,d-ph/symfony,gonzalovilaseca/symfony,lyrixx/symfony,andrerom/symfony,paradajozsef/symfony,joelwurtz/symfony,mpdude/symfony,mweimerskirch/symfony,smatyas/symfony,jderusse/symfony,paradajozsef/symfony,mweimerskirch/symfony,tgalopin/symfony,vincentaubert/symfony,docteurklein/symfony,sroze/symfony,Tobion/symfony,bendavies/symfony,chalasr/symfony,localheinz/symfony,tgalopin/symfony,garak/symfony,gnat42/symfony,docteurklein/symfony,Nyholm/symfony,alekitto/symfony,tucksaun/symfony,Taluu/symfony,Nyholm/symfony,pyrech/symfony,voronkovich/symfony,teohhanhui/symfony,ro0NL/symfony,nicolas-grekas/symfony,lstrojny/symfony,docteurklein/symfony,paradajozsef/symfony,1ed/symfony,deguif/symfony,Deamon/symfony,dmaicher/symfony,arjenm/symfony,damienalexandre/symfony,ogizanagi/symfony,derrabus/symfony,andrerom/symfony,pierredup/symfony,alekitto/symfony,jderusse/symfony,Simperfit/symfony,gonzalovilaseca/symfony,maidmaid/symfony,zcodes/symfony,pyrech/symfony,andrerom/symfony,xabbuh/symfony,OskarStark/symfony,andreia/symfony,pierredup/symfony,ro0NL/symfony,kbond/symfony,frankdejonge/symfony,bendavies/symfony,lstrojny/symfony,smatyas/symfony,sroze/symfony,voronkovich/symfony,mpdude/symfony,alekitto/symfony,derrabus/symfony,jvasseur/symfony,voronkovich/symfony,1ed/symfony,stof/symfony,mnapoli/symfony,dmaicher/symfony,fabpot/symfony,OskarStark/symfony,lstrojny/symfony,phramz/symfony,MatTheCat/symfony,symfony/symfony,shieldo/symfony,fabpot/symfony,frankdejonge/symfony,curry684/symfony,frankdejonge/symfony,arjenm/symfony,jakzal/symfony,Koc/symfony,yceruto/symfony,mweimerskirch/symfony,HeahDude/symfony,romaricdrigon/symfony,chalasr/symfony,ogizanagi/symfony,teohhanhui/symfony,curry684/symfony,andreia/symfony,Tobion/symfony,yceruto/symfony,gnat42/symfony,gonzalovilaseca/symfony,romaricdrigon/symfony,pierredup/symfony,fabpot/symfony,zcodes/symfony,mnapoli/symfony,smatyas/symfony,OskarStark/symfony,Deamon/symfony,tucksaun/symfony,phramz/symfony,Taluu/symfony,jvasseur/symfony,sgehrig/symfony,smatyas/symfony,kbond/symfony,Simperfit/symfony,tucksaun/symfony,symfony/symfony,joelwurtz/symfony,jakzal/symfony,mnapoli/symfony,kbond/symfony,ro0NL/symfony,jakzal/symfony,lyrixx/symfony,zerkms/symfony,Slamdunk/symfony,romaricdrigon/symfony,pierredup/symfony,gnat42/symfony,xabbuh/symfony,vincentaubert/symfony,deguif/symfony,pyrech/symfony,arjenm/symfony,phramz/symfony,oleg-andreyev/symfony,lyrixx/symfony,Deamon/symfony,OskarStark/symfony,derrabus/symfony,yceruto/symfony,HeahDude/symfony,nicolas-grekas/symfony,phramz/symfony,zerkms/symfony,dmaicher/symfony,d-ph/symfony,damienalexandre/symfony,zcodes/symfony,tgalopin/symfony,yceruto/symfony,joelwurtz/symfony,oleg-andreyev/symfony,jvasseur/symfony,teohhanhui/symfony,MatTheCat/symfony,oleg-andreyev/symfony,xabbuh/symfony,Slamdunk/symfony,lyrixx/symfony,sgehrig/symfony,dmaicher/symfony,Simperfit/symfony,Tobion/symfony,Taluu/symfony,kbond/symfony