Maybe need allow the short tag for v8?
Permalink
I'm talking about tag "<?=" only.
Version 8 system requirements PHP 5.5.9+ (PHP 5.6 or 7 recommended.).
Short tag "<?=" always available since PHP 5.4.0http://php.net/manual/en/migration54.new-features.php...
Why this tag forbidden in packages?
Version 8 system requirements PHP 5.5.9+ (PHP 5.6 or 7 recommended.).
Short tag "<?=" always available since PHP 5.4.0http://php.net/manual/en/migration54.new-features.php...
Why this tag forbidden in packages?
Hi guyasyou,
In the example you pasted, there is a space between the question mark and the equals sign.
"<? ="
I wonder if the marketplace linter is seeing that as "<?". If so, it is seeing it as a short open tag and not echo shortcut syntax.
In the example you pasted, there is a space between the question mark and the equals sign.
"<? ="
I wonder if the marketplace linter is seeing that as "<?". If so, it is seeing it as a short open tag and not echo shortcut syntax.
It was just a typo
This is likely not allowed as they can be disabled on servers quite easily, and sometimes people do disable them due to security concerns years ago - no longer a real concern.
But to keep compatibility high you should never use short tags in 3rd party items as you cannot guarantee the user buying your code has them enabled.
But to keep compatibility high you should never use short tags in 3rd party items as you cannot guarantee the user buying your code has them enabled.
"<?=" cannot be disabled since php 5.4
https://secure.php.net/manual/en/ini.core.php#ini.short-open-tag...
Note:
This directive also affected the shorthand <?= before PHP 5.4.0, which is identical to <? echo. Use of this shortcut required short_open_tag to be on. Since PHP 5.4.0, <?= is always available.
https://secure.php.net/manual/en/ini.core.php#ini.short-open-tag...
Note:
This directive also affected the shorthand <?= before PHP 5.4.0, which is identical to <? echo. Use of this shortcut required short_open_tag to be on. Since PHP 5.4.0, <?= is always available.
@guyasyou
The marketplace linter also lints 5.6 and 5.7 add-ons and themes. The PHP minimum for those is below 5.4.
The marketplace linter also lints 5.6 and 5.7 add-ons and themes. The PHP minimum for those is below 5.4.
I'm in favor of enabling the short echo tags for packages requiring concrete5 8.0+: it's such a handy coding style that I couldn't live without it xD
As always, things are moving forward, and I think that more and more people will switch to v8.
I don't think it'll be a problem for PRB reviewers, since it should be an automatic test that doesn't need manual review.
Imposing to not use short echo tags would be a kind of "violence" against package developers. With no valid reason imho.
As always, things are moving forward, and I think that more and more people will switch to v8.
I don't think it'll be a problem for PRB reviewers, since it should be an automatic test that doesn't need manual review.
Imposing to not use short echo tags would be a kind of "violence" against package developers. With no valid reason imho.
Hence the one size fits all approach. We all compromise to a median (Including PRB members and Portland Labs), which is the current guidelines.
That's not a comment on this specific issue, but a generalisation that makes the whole system workable for the amount of resources available.
Currently I don't think we can justify unnecessarily diverging guidelines for 5.7 and v8.
For short tags, amongst other ways they can be automatically expanded using the c5 command line. Work in short tags as much as you like, then replace them as part of your final build process. That is what the core does.
When the c5 core is released with short tags and core support for non short-tag versions of php is completely dropped, that will be when the overall guideline can change.