-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[RFC] Short Open Tag deprecation V2 #4263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Tokenizer test change committed in b2d6d29. |
0d53cdb
to
2c465aa
Compare
By the way, thanks @nikic for announcing the new implementation on internals, however, it seems no one has replied to it. So what's the plan with it? |
If there's no objection on list we can land it. |
Please don't remove short open tags. There are no practical benefits of doing this (as is even clear from its RFC) and it only would impose a cost to all legacy applications to just change the syntax of their source code to yield nothing. |
@salarmehr: there is reasoning on rfc page (own section): https://wiki.php.net/rfc/deprecate_php_short_tags#reasoning
from these, the strongest argument IMHO is the portability, the others all have solutions (workaround), but it's still not a big reason to drop short tags; if you need to write portable code, use also, the discouragement in the documentation says that it needs to be enabled first:
so such choice can be still preserved if having some framework/templates optimized for file size (or why the short tags)? as for converting legacy application, |
@glensc, yep, I have had seen those "reasons". None of them is even slightly compelling. All four first mentioned reasons are essentially considering the dependence of short syntax to ini configuration. There are numerous features and extensions whose are related to ini file. Should we deprecate all? The correct RFC should be enabling the short tag by default and advocating of using it as there is no drawback of using it. In the very very rare case of using XML and PHP together, the ini option is available. |
Just a FYI as CS-Fixer is mentioned above: PHP_CodeSniffer (of course) also has a sniff for this. The When the ini-setting is turned off, the sniff will not auto-fix, but will still be able to detect short open tags with near 100% accuracy and will throw a |
@jrfnl thanks for your comment. The argument here is there is no point in introducing such an issue in the first place. |
@salarmehr My comment wasn't intended for you. |
2c465aa
to
462e642
Compare
462e642
to
951df56
Compare
I'll just comment on that because this getting closed anyway. Closing because RFC has been declined. |
thansk, link to counterargument rfc as well: https://wiki.php.net/rfc/counterargument/deprecate_php_short_tags |
@glensc So glad that RFC is declined. Thanks for the link. |
This is all very confusing. How can an RFC be proposed, announced, voted on, accepted, but not merged? I understand that this is version 2, which was declined, but that just means that version 1 was never superseded. Because RFC version 1 was accepted, to undo an accepted RFC or modify the RFC, there must be a new RFC that is voted on and accepted. Note: Edited to highlight the procedural concerns which don't appear to be addressed here or in the RFCs. |
@jrchamp please direct your frustration to the individuals who pressured me to redo a second version of a passed RFC and consider the first one void. As I am in no way able to act open it. Or directly the PHP internals mailing list. |
Thank you @Girgias for explaining and trying to make PHP better. I have done a lot of reading of the [complete meltdown] that is occurring on the PHP Internals mailing list, so I think it's going to be some time before the group as a whole can decide on anything. For those who have the same question as me and end up here, the result appears to be this:
Net change: None, other than turmoil in the PHP internals community. I ❤️ all of you and I hope civility returns someday soon. |
@jrchamp would you mind sharing the link of the thread of the mailing list? |
Hi @abbychau Caution The discussions get heated and hurtful soon after the results of the first vote are posted. php-internals threads: |
New implementation for the Short open tag deprecation RFC.
Supersedes #3972