PHPCompatibility v7.0.5 Release Notes
Release Date: 2016-09-08 // over 7 years ago-
๐ See all related issues and PRs in the [7.0.5 milestone].
โ Added
- ๐ :star2: New
MbstringReplaceEModifier
sniff to detect the use of the PHP 7.1 deprecatede
modifier in Mbstring regex functions. #202 - :star: The
ForbiddenBreakContinueVariableArguments
sniff will now also report onbreak 0
/continue 0
which is not allowed since PHP 5.4. #209 - :star: New
getFunctionCallParameters()
,getFunctionCallParameter()
utility methods in thePHPCompatibility_Sniff
base class. #170 - :star: New
tokenHasScope()
utility method in thePHPCompatibility_Sniff
base class. #189 - โ
:umbrella: Unit test for
goto
andcallable
detection and some other miscellanous extra unit tests for theNewKeywords
sniff. #189 - :books: Readme: Information for sniff developers about running unit tests for other sniff libraries using the PHPCS native test framework without running into conflicts with the PHPCompatibility specific unit test framework. #217
๐ Changed
- :pushpin: The
ForbiddenNames
sniff will now also check interface declarations for usage of reserved keywords. #200 - ๐ :pushpin:
PregReplaceEModifier
sniff: improved handling of regexes build up of a combination of variables, function calls and/or text strings. #201 - :rewind: The
NewKeywords
sniff will now also correctly recognize new keywords when used in combination with older PHPCS versions and/or run on older PHP versions. #189 - :pencil2:
PregReplaceEModifier
sniff: minor improvement to the error message text. #201 - ๐ :recycle: Various (minor) refactoring for improved performance and sniff accuracy. #170, #188, #189, #199, #200, #201, #208
- ๐ :wrench: The unit tests for the utility methods have been moved to their own subdirectory within
Tests
. #215 - โ :green_heart: The sniffs are now also tested against PHP 7.1 for consistent results. #216
โ Removed
๐ Fixed
- :bug:
ConstantArraysUsingDefine
sniff: the version check logic was reversed causing the error not to be reported in certain circumstances. #199 - ๐ :bug: The
DeprecatedIniDirectives
andNewIniDirectives
sniffs could potentially trigger on the ini value instead of the ini directive name. #170 - โ
:bug:
ForbiddenNames
sniff: Reserved keywords when used as the name of a constant declared usingdefine()
would always be reported independently of thetestVersion
set. #200 - :bug:
PregReplaceEModifier
sniff would not report errors when the function name used was not in lowercase. #201 - :bug:
TernaryOperators
sniff: the version check logic was reversed causing the error not to be reported in certain circumstances. #188 - โ :bug: The
getFQClassNameFromNewToken()
andgetFQClassNameFromDoubleColonToken()
utility methods would get confused when the class name was a variable instead of being hard-coded, resulting in a PHP warning being thown. #206. Fixes #205. - ๐ :bug: The
getFunctionCallParameters()
utility method would incorrectly identify an extra parameter if the last parameter passed to a function would have an - unnecessary - comma after it. ThegetFunctionCallParameters()
utility method also did not handle parameters passed as short arrays correctly. #213. Fixes #211. - โ
:umbrella: Unit tests for the
NewFunctionArrayDereferencing
sniff were not being run due to a naming error. #208 - โ
:books: Readme: Information about setting the
testVersion
from a custom ruleset was incorrect. #204 - โ :wrench: Path to PHPCS in the unit tests breaking for non-Composer installs. #198
Credits
Thanks go out to [Juliette Reinders Folmer] and [Yoshiaki Yoshida] for their contributions to this version. :clap:
- ๐ :star2: New