Skip to content

Commit

Permalink
The PSR1 standard now correctly bans alternate PHP tags (ref #2415)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Apr 15, 2019
1 parent 2d6b0f7 commit 55d563e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
</stability>
<license uri="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt">BSD 3-Clause License</license>
<notes>
- The PSR1 standard now correctly bans alternate PHP tags
-- Previously, it only banned short open tags and not the pre-7.0 alternate tags
- Added support for only checking files that have been locally staged in a git repo
-- Use --filter=gitstaged to check these files
-- You still need to give PHPCS a list of files or directories in which to apply the filter
Expand Down
1 change: 1 addition & 0 deletions src/Standards/PSR1/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<!-- 2.1. PHP Tags -->

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

0 comments on commit 55d563e

Please sign in to comment.