Skip to content

Commit

Permalink
Changelog + rename + message change for #2750
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Dec 20, 2019
1 parent 34ebced commit 278b643
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
10 changes: 6 additions & 4 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
<notes>
- The PHP 7.4 numeric separator backfill now works correctly for more float formats
- The PHP 7.4 numeric separator backfill is no longer run on PHP versions 7.4.0 or greater
- Added Generic.PHP.DisallowRequestSuperglobal to ban the use of the $_REQUEST superglobal
-- Thanks to Morerice for the contribution
- Fixed bug #2688 : Case statements not tokenized correctly when switch is contained within ternary
- Fixed bug #2698 : PHPCS throws errors determining auto report width when shell_exec is disabled
-- Thanks to Matthew Peveler for the patch
Expand Down Expand Up @@ -249,7 +251,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<file baseinstalldir="PHP/CodeSniffer" name="ClosingPHPTagStandard.xml" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="DeprecatedFunctionsStandard.xml" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowAlternativePHPTagsStandard.xml" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowRequestSuperGlobalStandard.xml" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowRequestSuperglobalStandard.xml" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowShortOpenTagStandard.xml" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="DiscourageGotoStandard.xml" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="ForbiddenFunctionsStandard.xml" role="php" />
Expand Down Expand Up @@ -353,7 +355,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<file baseinstalldir="PHP/CodeSniffer" name="CharacterBeforePHPOpeningTagSniff.php" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="ClosingPHPTagSniff.php" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="DeprecatedFunctionsSniff.php" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowRequestSuperGlobalSniff.php" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowRequestSuperglobalSniff.php" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowShortOpenTagSniff.php" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowAlternativePHPTagsSniff.php" role="php" />
<file baseinstalldir="PHP/CodeSniffer" name="DiscourageGotoSniff.php" role="php" />
Expand Down Expand Up @@ -613,8 +615,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
<file baseinstalldir="PHP/CodeSniffer" name="DisallowAlternativePHPTagsUnitTest.2.inc.fixed" role="test" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowAlternativePHPTagsUnitTest.3.inc" role="test" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowAlternativePHPTagsUnitTest.php" role="test" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowRequestSuperGlobalUnitTest.inc" role="test" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowRequestSuperGlobalUnitTest.php" role="test" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowRequestSuperglobalUnitTest.inc" role="test" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowRequestSuperglobalUnitTest.php" role="test" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowShortOpenTagUnitTest.1.inc" role="test" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowShortOpenTagUnitTest.1.inc.fixed" role="test" />
<file baseinstalldir="PHP/CodeSniffer" name="DisallowShortOpenTagUnitTest.2.inc" role="test" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<documentation title="$_REQUEST Super Global">
<documentation title="$_REQUEST Superglobal">
<standard>
<![CDATA[
$_REQUEST should never be used due to the ambiguity created to identify where the data is coming from. Use $_POST, $_GET or $_COOKIE instead
$_REQUEST should never be used due to the ambiguity created as to where the data is coming from. Use $_POST, $_GET, or $_COOKIE instead.
]]>
</standard>
</documentation>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Ensures the $_REQUEST super global is not used
* Ensures the $_REQUEST superglobal is not used
*
* @author Jeantwan Teuma <jeant.m24@gmail.com>
* @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600)
Expand All @@ -12,7 +12,7 @@
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;

class DisallowRequestSuperGlobalSniff implements Sniff
class DisallowRequestSuperglobalSniff implements Sniff
{


Expand Down Expand Up @@ -45,7 +45,7 @@ public function process(File $phpcsFile, $stackPtr)
return;
}

$error = 'The $_REQUEST super global should not be used. Use $_GET, $_POST or $_COOKIE instead';
$error = 'The $_REQUEST superglobal should not be used; use $_GET, $_POST, or $_COOKIE instead';
$phpcsFile->addError($error, $stackPtr, 'Found');

}//end process()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Unit test class for the DisallowRequestSuperGlobal sniff.
* Unit test class for the DisallowRequestSuperglobal sniff.
*
* @author Jeantwan Teuma <jeant.m24@gmail.com>
* @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600)
Expand All @@ -10,7 +10,7 @@

use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;

class DisallowRequestSuperGlobalUnitTest extends AbstractSniffUnitTest
class DisallowRequestSuperglobalUnitTest extends AbstractSniffUnitTest
{


Expand Down

0 comments on commit 278b643

Please sign in to comment.