github PHPCompatibility/PHPCompatibility 8.1.0
PHPCompatibility 8.1.0

latest releases: 9.3.5, 9.3.4, 9.3.3...
6 years ago

See all related issues and PRs in the 8.1.0 milestone.

Added

  • 🌟 New NewConstants and RemovedConstants 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 the mcrypt extension which has been removed in PHP 7.2. #566
  • RemovedGlobalVariables : detection of the use of $php_errormsg with track_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 a global 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 per global statement. #564
  • 📌 ForbiddenGlobalVariableVariable : the sniff will now throw warnings for non-bare variables used in a global statement as those are discouraged since PHP 7.0. #564
  • NewLanguageConstructs : updated the version number for T_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 to 0.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 on global 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. 👏

Don't miss a new PHPCompatibility release

NewReleases is sending notifications on new releases.