I am working on budget upgrade of legacy Silex 1.x and PHP5 based application to Silex 2.3 with PHP7.4 I am well aware that Silex is dead and, ideally, app should be migrated to Symfony but this is not possible for now due to time and budget limitations. So far everything is okay with exception of one problem that drives me insane: Twig always strips spaces around it's statements.
For example if I have in a template:
HELLO {{ name }} !
Where name has value of 'World', then the result will always be HELLOWorld! All spaces around the brackets will be stripped away.
This behavior did not happen with old Silex environment, it does not happen with new twig 3.0 environment in another project either.
It is almost as if twig uses the whitespace trimming logic (the one with '-' character) by default with exception of the fact that it does not remove line breaks.
Did anyone encounter this and do you know how to solve this issue?
Thanks