See all related issues and PRs in the 7.0.4 milestone.
Added
- 🌟 New
EmptyNonVariable
sniff: detection of empty being used on non-variables for PHP < 5.5. #187 - 🌟 New
NewMagicMethods
sniff: detection of declaration of magic methods before the method became "magic". Includes a check for the changed behaviour for the__toString()
magic method in PHP 5.2. #176. Fixes #64. - 🌟 New
RemovedAlternativePHPTags
sniff: detection of ASP and script open tags for which support was removed in PHP 7.0. #184, #193. Fixes #127. - ⭐
NonStaticMagicMethods
sniff: detection of the__callStatic()
,__sleep()
,__toString()
and__set_state()
magic methods. - 💚 Lint all non-test case files for syntax errors during the build testing by Travis. #192
Changed
- 📌
NonStaticMagicMethods
sniff: will now also snifftrait
s for magic methods. #174 - 📌
NonStaticMagicMethods
sniff: will now also check for magic methods which should be declared asstatic
. #174 - ♻️ Various (minor) refactoring for improved performance and sniff accuracy. #178, #179, #174, #171
- ♻️ The unit test suite now internally caches PHPCS run results in combination with a set
testVersion
to speed up the running of the unit tests. These are now ~3 x faster. #148 - 📚 Readme: Minor clarification of the minimum requirements.
- 📚 Readme: Advise to use the latest stable version of this repository.
- 🔧 The unit tests can now be run with PHPCS installed in an arbitrary location by passing the location through an environment option. #191.
- 🔧 Improved coveralls configuration and compatibility. #194
- 💚 The sniffs are now also tested against PHP 5.2 for consistent results. Except for namespace, trait and group use related errors, most sniffs work as intended on PHP 5.2. #196
Fixed
- 🐛 The
ForbiddenBreakContinueVariableArguments
sniff would not report onbreak
/continue
with a closure as an argument. #171 - 🐛 The
ForbiddenNamesAsInvokedFunctions
sniff would not report on reserved keywords which were not lowercase. #186 - 🐛 The
ForbiddenNamesAsInvokedFunctions
sniff would not report on thegoto
andnamespace
keywords when run on PHP 5.2. #193 - 🐛
NewAnonymousClasses
sniff: the version check logic was reversed causing the error not to be reported in certain circumstances. #195. - 🐛
NewGroupUseDeclarations
sniff: the version check logic was reversed causing the error not to be reported in certain circumstances. #190. - 🐛 The
NonStaticMagicMethods
sniff would not report on magic methods when the function name as declared was not in the same case as used in the PHP manual. #174 - 🔧 The unit tests would exit with
0
if PHPCS could not be found. #191 - 💚 The PHPCompatibility library itself was not fully compatible with PHP 5.2. #193
Credits
Thanks go out to Juliette Reinders Folmer for her contributions to this version. 👏