Skip to content

Commit 55d563e

Browse files
committed
The PSR1 standard now correctly bans alternate PHP tags (ref #2415)
1 parent 2d6b0f7 commit 55d563e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

package.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
2626
</stability>
2727
<license uri="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt">BSD 3-Clause License</license>
2828
<notes>
29+
- The PSR1 standard now correctly bans alternate PHP tags
30+
-- Previously, it only banned short open tags and not the pre-7.0 alternate tags
2931
- Added support for only checking files that have been locally staged in a git repo
3032
-- Use --filter=gitstaged to check these files
3133
-- You still need to give PHPCS a list of files or directories in which to apply the filter

src/Standards/PSR1/ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<!-- 2.1. PHP Tags -->
88

99
<!-- PHP code MUST use the long <?php ?> tags or the short-echo <?= ?> tags; it MUST NOT use the other tag variations. -->
10+
<rule ref="Generic.PHP.DisallowAlternativePHPTags"/>
1011
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
1112
<rule ref="Generic.PHP.DisallowShortOpenTag.EchoFound">
1213
<severity>0</severity>

0 commit comments

Comments
 (0)