See all related issues and PRs in the 8.1.0 milestone.
Added
- 🌟 New
NewConstants
andRemovedConstants
sniffs to detect usage of new/removed PHP constants for all PHP versions from PHP 5 up. #526, #551, #566. Fixes #263. - 🌟 New
MagicAutoloadDeprecation
sniff to detect deprecated__autoload()
functions as deprecated in PHP 7.2. #540 - 🌟 New
OptionalRequiredFunctionParameter
sniff to check for missing function call parameters which were required and only became optional in a later PHP version. #524 - 🌟 New
DynamicAccessToStatic
sniff to detect dynamic access to static methods and properties, as well as class constants, prior to PHP 5.3. #535. Fixes #534. - ⭐
DeprecatedFunctions
sniff: recognize yet more PHP 7.2 deprecated functions. #561, #566 - ⭐
DeprecatedIniDirectives
sniff: recognize the last of the PHP 7.2 deprecated ini directives. #566, #567 - ⭐
NewFunctions
: detection of all new PHP 7.2 functions added. #522, #545, #551, #565 - ⭐
RemovedExtensions
: report on usage of themcrypt
extension which has been removed in PHP 7.2. #566 - ⭐
RemovedGlobalVariables
: detection of the use of$php_errormsg
withtrack_errors
which has been deprecated in PHP 7.2. #528 - 📚 Documentation : added reporting usage instructions. #533, #552
Changed
- 📌
NewClosures
: downgraded "$this found in closure outside class" to warning. #536. Fixes #527. - 📌
ForbiddenGlobalVariableVariable
: the sniff will now throw an error for each variable in aglobal
statement which is no longer supported and show the variable found to make it easier to fix this. Previously only one error would be thrown perglobal
statement. #564 - 📌
ForbiddenGlobalVariableVariable
: the sniff will now throwwarning
s for non-bare variables used in aglobal
statement as those are discouraged since PHP 7.0. #564 - ⏪
NewLanguageConstructs
: updated the version number forT_COALESCE_EQUAL
. #523 - ✏️
Sniff::getTestVersion()
: simplified regex logic. #520 - 💚 Travis : build tests are now being run against PHP 7.2 as well. #511
- 🔧 Improved check for superfluous whitespaces in files. #542
- 🔧 Build/PHPCS : stabilized the exclude patterns. #529
- 🔧 Build/PHPCS : added array indentation check. #538
- ✅ PHPCS cross-version compatibility : sync
FindExtendedClassname()
method with upstream. #507 - 🔧 The minimum version for the recommended
DealerDirect/phpcodesniffer-composer-installer
Composer plugin has been upped to0.4.3
. #548
Fixed
- 🐛
ForbiddenCallTimePassByReference
: a false positive was being thrown when a global constant was followed by a bitwise and. #562. Fixes #39. - 🐛
ForbiddenGlobalVariableVariable
: the sniff was overzealous and would also report onglobal
in combination with variable variables which are still supported. #564. Fixes #537. - 🐛
ForbiddenGlobalVariableVariable
: variables interspersed with whitespace and/or comments were not being reported. #564 - ⏪
ForbiddenNamesAsInvokedFunctions
: improved recognition of function invocations using forbidden words and prevent warnings for keywords which are no longer forbidden as method names in PHP 7.0+. #516. Fixes #515 - 🐛
VariableVariables
: variables interspersed with whitespace and/or comments were not being reported. #563 - ☔ Fixed some unintentional syntax errors in test files. #539
- ☔ Tests : fixed case numbering error. #525
- 📚 Tests : added missing test skip explanation. #521
- 🔧 Fixed PHPCS whitespaces. #543
- 🔧 Fixed code test coverage verification. #550. Fixes #549.
Credits
Thanks go out to Juliette Reinders Folmer and Jonathan Van Belle for their contributions to this version. 👏