Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
CaseSensitiveKeywordssniff to detect use of non-lowercase
parentkeywords which could cause compatibility issues pre-PHP 5.5. #382
ConstantArraysUsingConstsniff to detect constants defined using the
constkeyword being assigned an array value which was not supported prior to PHP 5.6. #397
ForbiddenClosureUseVariableNamessniff to detect PHP 7.1 forbidden variable names in closure use statements. #386. Fixes #374
NewArrayStringDereferencingsniff to detect array and string literal dereferencing as introduced in PHP 5.5. #388
NewHeredocInitializesniff to detect initialization of static variables and class properties/constants using the heredoc syntax which is supported since PHP 5.3. #391. Fixes #51
NewMagicClassConstantsniff to detect use of the magic
::classconstant as introduced in PHP 5.5. #403. Fixes #364.
NewUseConstFunctionsniff to detect use statements importing constants and functions as introduced in PHP 5.6. #401
DeprecatedFunctionssniff: recognize PHP 7.2 deprecated GD functions. #392
DeprecatedIniDirectivessniff: recognize PHP 7.2 deprecated
NewClassessniff: check for the PHP 5.1
NewClassessniff: recognize all native PHP Exception classes. #418
NewClosuressniff: check for closures being declared as static and closures using
$this. Both of which was not supported pre-PHP 5.4. #389. Fixes #24.
NewFunctionParameterssniff: recognize new
exclude_disabledparameter for the
get_defined_functions()function as introduced in PHP 7.0.15. #375
NewFunctionssniff: recognize new PHP 7.2 socket related functions. #376
NewInterfacessniff: check for some more PHP native interfaces. #411
validDirectScope()utility methods to the
PHPCompatibility_Sniffclass. #393, #391.
getTypeHintsFromFunctionDeclaration()utility method to the
☔️Unit tests against false positives for the
☔️More unit tests for the
getTestVersion()utility method. #405, #430
💚The XML of the ruleset will now be validated and checked for consistent code style during the build testing by Travis. #433 📚Readme: information about setting
installed_pathsvia a custom ruleset. #407
Changelog.mdfile containing a record of notable changes since the first tagged release. #421
ForbiddenNamesAsDeclaredsniff will now emit
warnings for soft reserved keywords. #406, #370.
ForbiddenNamessniff will now allow for the more liberal rules for usage of reserved keywords as of PHP 7.0. #417
RemovedGlobalVariablessniffs will now also sniff for and correctly report violations in combination with anonymous classes. #378, #383, #393, #394, #395, #396. Fixes #351 and #333.
NewInterfacessniffs will now also report on new classes/interfaces when used as type hints. #414, #416. Fixes #352
NewClassessniff will now also report on Exception classes when used in (multi-)
catchstatements. #418. Fixes #373.
NewScalarTypeDeclarationssniff will now report on new type hints even when the type hint is nullable. #379
NewNowdocsniff has been renamed to
NewNowdocQuotedHeredocand will now also check for double quoted heredoc identifiers as introduced in PHP 5.3. #390
NewClassessniff will now also report anonymous classes which
extenda new sniff when used in combination with PHPCS 2.4.0-2.8.0. #432. Fixes #334.
NewFunctionParametersniff: version number precision for two parameters. #384, #428
☔️Skipping two unit tests for the
ForbiddenClosureUseVariablesniff when run on PHPCS 2.5.1 as these cause an infinite loop due to an upstream bug. #408
☔️Skipping unit tests involving
traits in combination with PHP < 5.4 and PHPCS < 2.4.0 as
traits are not recognized in those circumstances. #431
♻️Various (minor) refactoring for improved performance and sniff accuracy. #385, #387, #415, #423, #424 ♻️Minor simplification of the PHPUnit 6 compatibility layer and other test code. #426, #425
- General housekeeping. #398, #400
🔧Minor tweaks to the Travis build script. #409 💚The sniffs are now also tested against PHP nightly for consistent results. #380
🔥Using unbounded ranges in
testVersionresulted in unreported errors when used with sniffs using the
supportsBelow()method. This affected the results of approximately half the sniffs. #430
ForbiddenNamessniff would throw false positives for
usestatements with the
finalmodifier in traits. #402.
ForbiddenNamessniff would fail to report on functions declared to return by reference using a reserved keyword as the function name. #413
ForbiddenNamessniff would only examine the first part of a namespace and not report on reserved keywords used in subsequent parts of a nested namespace. #419
ForbiddenNamessniff would not always correctly report on use statements importing constants or functions using reserved keywords. #420
NewKeywordssniff would sometimes fail to report on the
constkeyword when used in a class, but not for a class constant. #424
💚PHPCS has released version 3.0 and updated the
masterbranch to reflect this. This was causing the builds to fail. #422