The plugin assumes that <?php is not present in the script itself. If <?php is included in the file, at any point, the engine injects the macro.yay in the result.
You can verify the issue in this file, processing it with any plugin: https://github.com/symfony/translation/blob/master/Translator.php#L344
As a workaround, I've implemented in the caller a preprocessing of the text to escape <?php before the call. But, I think it has to be fixed in the engine to support any PHP script.
The plugin assumes that
<?phpis not present in the script itself. If<?phpis included in the file, at any point, the engine injects the macro.yay in the result.You can verify the issue in this file, processing it with any plugin: https://github.com/symfony/translation/blob/master/Translator.php#L344
As a workaround, I've implemented in the caller a preprocessing of the text to escape
<?phpbefore the call. But, I think it has to be fixed in the engine to support any PHP script.