PHPCompatibility v7.0.7 Release Notes
Release Date: 2016-10-20 // over 7 years ago-
๐ See all related issues and PRs in the [7.0.7 milestone].
โ Added
- ๐ :star2: New
ForbiddenBreakContinueOutsideLoop
sniff: verify thatbreak
/continue
is not used outside of a loop structure. This will cause fatal errors since PHP 7.0. #278. Fixes #275 - ๐ :star2: New
NewConstVisibility
sniff: detect visibility indicators forclass
andinterface
constants as introduced in PHP 7.1. #280. Fixes #249 - :star2: New
NewHashAlgorithms
sniff to check used hash algorithms against the PHP version in which they were introduced. #242 - ๐ :star2: New
NewMultiCatch
sniff: detect catch statements catching multiple Exceptions as introduced in PHP 7.1. #281. Fixes #251 - ๐ :star2: New
NewNullableTypes
sniff: detect nullable parameter and return type hints (only supported in PHPCS >= 2.3.4) as introduced in PHP 7.1. #282. Fixes #247 - ๐ :star:
DeprecatedIniDirectives
sniff: recognize PHP 7.1 removedsession
ini directives. #256 - :star:
NewFunctions
sniff: recognize newsocket_export_stream()
function as introduced in PHP 7.0.7. #264 - :star:
NewFunctions
sniff: recognize newcurl_...()
,is_iterable()
,pcntl_async_signals()
,session_create_id()
,session_gc()
functions as introduced in PHP 7.1. #273 - :star:
NewFunctionParameters
sniff: recognize new OpenSSL function parameters as introduced in PHP 7.1. #258 - :star:
NewIniDirectives
sniff: recognize newsession
ini directives as introduced in PHP 7.1. #259 - :star:
NewScalarReturnTypeDeclarations
sniff: recognize PHP 7.1void
return type hint. #250 - :star:
NewScalarTypeDeclarations
sniff: recognize PHP 7.1iterable
type hint. #255 - ๐ :star: Recognize the PHP 7.1 deprecated
mcrypt
functionality in theRemovedExtensions
,DeprecatedFunctions
andDeprecatedIniDirectives
sniffs. #257
๐ Changed
- ๐ :pushpin:
LongArrays
sniff used to only throwwarning
s. It will now throwerror
s for PHP versions in which the long superglobals have been removed. #270 - โ :pushpin: The
NewIniDirectives
sniff used to always throw anwarning
. Now it will throw anerror
when a new ini directive is used in combination withini_set()
. #246. - ๐ :pushpin:
RemovedHashAlgorithms
sniff: also recognize removed algorithms when used with the PHP 5.5+hash_pbkdf2()
function. #240 - :pushpin: Properly recognize nullable type hints in the
getMethodParameters()
utility method. #282 - ๐
:pencil2:
DeprecatedPHP4StyleConstructors
sniff: minor error message text fix. #236 - :pencil2:
NewIniDirectives
sniff: improved precision for the introduction version numbers being reported. #246 - ๐ :recycle: Various (minor) refactoring for improved performance and sniff accuracy. #238, #244, #240, #276
- โ
:umbrella: Re-activate the unit tests for the
NewScalarReturnTypeDeclarations
sniff. #250
๐ Fixed
- ๐
:bug: The
DeprecatedPHP4StyleConstructors
sniff would not report errors when the case of the class name and the PHP4 constructor function name did not match. #236 - ๐ :bug:
LongArrays
sniff would report false positives for class properties shadowing removed PHP superglobals. #270. Fixes #268. - :bug: The
NewClasses
sniff would not report errors when the case of the class name used and "official" class name did not match. #237 - :bug: The
NewIniDirectives
sniff would report violations against the PHP version in which the ini directive was introduced. This should be the version below it. #246 - ๐ :bug:
PregReplaceEModifier
sniff would report false positives for compound regex parameters with different quote types. #266. Fixes #265. - ๐ :bug:
RemovedGlobalVariables
sniff would report false positives for lowercase/mixed cased variables shadowing superglobals. #245. - ๐ :bug: The
RemovedHashAlgorithms
sniff would not report errors when the case of the hash function name used and "official" class name did not match. #240 - :bug: The
ShortArray
sniff would report all violations on the line of the PHP open tag, not on the lines of the short array open/close tags. #238
Credits
Thanks go out to [Juliette Reinders Folmer] for her contributions to this version. :clap:
- ๐ :star2: New