Hi devs, Recently, I've been hit by PHP bug #55156 <https://bugs.php.net/55156>related to annotations.
The first easy workaround is to put an empty doc comment in front of every class. After looking at PHP's source code, I figured out there was a more surgical one: adding an empty code block {} just after the namespace declaration. That's because a closing curly bracket triggers an internal parser's state reset for doc comments. This reset can also be made outside of the original code, by just adding an eval('{}') before every include. And this is cool, because it opens the door for a universal workaround, at the framework level. To make you know about this, I opened a pull request, that got quickly closed of course: https://github.com/symfony/symfony/pull/6261 So, before going to make a true patch for Symfony, I have a fundamental question: does it have a chance to be merged? More specifically, what is your position concerning workarounds being included in the core? How do you value the performance penalty vs developers comfort/productivity? Personally, I'd say I'm ok to pay a negligible performance cost like the constant comparison, when it frees my devs from even knowing that PHP bug #55156 exists. For people with PHP 5.3.7 and below, they would pay a little more cost, because of the eval('{}'), but then, I'd say them : upgrade or accept, both are good for you. What do you think? Nicolas -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to symfony-devs@googlegroups.com To unsubscribe from this group, send email to symfony-devs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en