Changelog History
Page 4
-
v7.0 Changes
July 02, 2016π See all related issues and PRs in the [7.0 milestone].
β Added
- β
:zap: Ability to specify a range of PHP versions against which to test your code base for compatibility, i.e.
--runtime-set testVersion 5.0-5.4will now test your code for compatibility with PHP 5.0 up to PHP 5.4. #99 - π :star2: New
NewFunctionArrayDereferencingsniff to detect function array dereferencing as introduced in PHP 5.4. Fixes #52. - π :star2: New
ShortArraysniff to detect short array syntax as introduced in PHP 5.4. #97. Fixes #47. - π :star2: New
TernaryOperatorssniff to detect ternaries without the middle part (elvisoperator) as introduced in PHP 5.3. #101, #103. Fixes #49. - :star2: New
ConstantArraysUsingDefinesniff to detect constants declared usingdefine()being assigned anarrayvalue which was not allowed prior to PHP 7.0. #110 - π
:star2: New
DeprecatedPHP4StyleConstructorssniff to detect PHP 4 style class constructor methods which are deprecated as of PHP 7. #109. - π :star2: New
ForbiddenEmptyListAssignmentsniff to detect empty list() assignments which have been removed in PHP 7.0. #110 - :star2: New
ForbiddenFunctionParametersWithSameNamesniff to detect functions declared with multiple same-named parameters which is no longer accepted since PHP 7.0. #110 - :star2: New
ForbiddenGlobalVariableVariablesniff to detect variable variables being madeglobalwhich is not allowed since PHP 7.0. #110 - :star2: New
ForbiddenNegativeBitshiftsniff to detect bitwise shifts by negative number which will throw an ArithmeticError in PHP 7.0. #110 - 0οΈβ£ :star2: New
ForbiddenSwitchWithMultipleDefaultBlockssniff to detect switch statements with multiple default blocks which is not allowed since PHP 7.0. #110 - :star2: New
NewAnonymousClassessniff to detect anonymous classes as introduced in PHP 7.0. #110 - π :star2: New
NewClosuresniff to detect anonymous functions as introduced in PHP 5.3. Fixes #35 - π :star2: New
NewFunctionParameterssniff to detect use of new parameters in build-in PHP functions. Initially only sniffing for the new PHP 7.0 function parameters and the new PHP 5.3+before_needleparameter for thestrstr()function. #110, #112. Fixes #27. - :star2: New
NewGroupUseDeclarationssniff to detect group use declarations as introduced in PHP 7.0. #110 - :star2: New
NewScalarReturnTypeDeclarationssniff to detect scalar return type hints as introduced in PHP 7.0. #110 - :star2: New
NewScalarTypeDeclarationssniff to detect scalar function parameter type hints as introduced in PHP 7.0. #110 - π :star2: New
RemovedFunctionParameterssniff to detect use of removed parameters in build-in PHP functions. Initially only sniffing for the function parameters removed in PHP 7.0. #110 - :star2: New
RemovedGlobalVariablessniff to detect the PHP 7.0 removed$HTTP_RAW_POST_DATAsuperglobal. #110 - π :star:
DeprecatedFunctionssniff: detection of the PHP 5.4 deprecated OCI8 functions. #93 - :star:
ForbiddenNamesAsInvokedFunctionssniff: recognize PHP 5.5finallyas a reserved keywords when invoked as a function. #110 - :star:
NewKeywordssniff: detection of the use of the PHP 5.1+__halt_compilerkeyword. Fixes #50. - π :star:
NewKeywordssniff: detection of the PHP 5.3+nowdocsyntax. Fixes #48. - π :star:
NewKeywordssniff: detection of the use of theconstkeyword outside of a class for PHP < 5.3. Fixes #50. - π :star:
DeprecatedFunctionssniff: recognize PHP 7.0 deprecated and removed functions. #110 - π :star:
DeprecatedIniDirectivessniff: recognize PHP 7.0 removed ini directives. #110 - :star:
ForbiddenNamesAsInvokedFunctionssniff: recognize new PHP 7.0 reserved keywords when invoked as functions. #110 - :star:
ForbiddenNamessniff: recognize new PHP 7.0 reserved keywords. #110 - :star:
NewFunctionssniff: recognize new functions as introduced in PHP 7.0. #110 - :star:
NewLanguageConstructssniff: recognize new PHP 7.0<=>"spaceship" and??null coalescing operators. #110 - π :star:
RemovedExtensionssniff: recognize PHP 7.0 removedereg,mssql,mysqlandsybase_ctextensions. #110 - β
:umbrella: Additional unit tests for the
NewLanguageConstructssniff. #110 - β
:books: Readme: New section containing information about the use of the
testVersionconfig variable. - :books: Readme: Sponsor credits.
π Changed
- π :pushpin: The
DeprecatedIniDirectivessniff used to always throw anwarning. Now it will throw anerrorwhen a removed ini directive is used. #110. - β
:pushpin: The
DeprecatedNewReferencesniff will now throw an error when thetestVersionincludes PHP 7.0 or higher. #110 - π :pushpin: The
ForbiddenNamessniff now supports detection of reserved keywords when used in combination with PHP 7 anonymous classes. #108, #110. - β
:pushpin: The
PregReplaceEModifiersniff will now throw an error when thetestVersionincludes PHP 7.0 or higher. #110 - π :pencil2:
NewKeywordssniff: clarified the error message text for theusekeyword. Fixes #46. - π¨ :recycle: Minor refactor of the
testVersionrelated utility functions. #98 - π :wrench: Add autoload to the
composer.jsonfile. #96 Fixes #67. - β‘οΈ :wrench: Minor other updates to the
composer.jsonfile. #75 - :wrench: Improved creation of the code coverage reports needed by coveralls via Travis.
- β :green_heart: The sniffs are now also tested against PHP 7.0 for consistent results.
π Fixed
- π :bug: The
ForbiddenCallTimePassByReferencesniff was throwingUndefined indexnotices when used in combination with PHPCS 2.2.0. #100. Fixes #42. - π :bug: The
ForbiddenNamesAsInvokedFunctionssniff would incorrectly throw an error if thethrowkeyword was used with parenthesis. Fixes #118. - :bug: The
PregReplaceEModifiersniff incorrectly identifiede's in the pattern as theemodifier when using{}bracket delimiters for the regex. #94 - π :bug: The
RemovedExtensionssniff was throwing anerrorinstead of awarningfor deprecated, but not (yet) removed extensions. Fixes #62.
Credits
Thanks go out to AlexMiroshnikov, [Chris Abernethy], [dgudgeon], [djaenecke], [Eugene Maslovich], [Ken Guest], Koen Eelen, [Komarov Alexey], [Mark Clements] and [Remko van Bezooijen] for their contributions to this version. :clap:
- β
:zap: Ability to specify a range of PHP versions against which to test your code base for compatibility, i.e.
-
v5.6 Changes
September 14, 2015π See all related issues and PRs in the [5.6 milestone].
β Added
- :star2: New:
NewLanguageConstructssniff. The initial version of this sniff checks for the PHP 5.6**power operator and the**=power assignment operator. #87. Fixes #60. - :star2: New:
ParameterShadowSuperGlobalssniff which covers the PHP 5.4 change Parameter names that shadow super globals now cause a fatal error.`. #74 - π :star2: New:
PregReplaceEModifiersniff which detects usage of theemodifier in literal regular expressions used withpreg_replace(). Theemodifier will not (yet) be detected when the regex passed is a variable or constant. #81, #84. Fixes #71, #83. - π :star:
DeprecatedIniDirectivessniff: PHP 5.6 deprecated ini directives. - :star:
NewKeywordssniff: detection of thegotokeyword introduced in PHP 5.3 and thecallablekeyword introduced in PHP 5.4. #57 - β
:recycle:
PHPCompatibility_Sniffbase class initially containing thesupportsAbove()andsupportsBelow()utility methods. (Nearly) All sniffs now extend this base class and use these methods to determine whether or not violations should be reported for a settestVersion. #77 - :books: Readme: Composer installation instructions. #32, #61
- :wrench:
.gitignoreto ignore vendor and IDE related directories. #78 - :green_heart: Code coverage checking via coveralls.
π Changed
- :twisted_rightwards_arrows: The check for the
\namespace separator has been moved from theNewKeywordssniff to theNewLanguageConstructssniff. #88 - π :pencil2:
DeprecatedIniDirectivessniff: minor change in the sniff error message text. - π :pencil2:
DeprecatedFunctionssniff: minor change in the sniff error message text. - β‘οΈ :wrench: Minor updates to the
composer.jsonfile. #31, 34, #70 - π§ :wrench: Tests: The unit tests can now be run without configuration.
- β :wrench: Tests: Skipped unit tests will now be annotated as such. #85
- β :green_heart: The sniffs are now also tested against PHP 5.6 for consistent results.
- β :green_heart: The sniffs are now also tested against PHPCS 2.0+.
- β :green_heart: The sniffs are now tested using the new container-based infrastructure in Travis CI. #37
π Fixed
- π :bug: The
ForbiddenCallTimePassByReferencesniff was throwing false positives when a bitwise and&was used in combination with class constants and class properties within function calls. #44. Fixes #39. - :bug: The
ForbiddenNamesAsInvokedFunctionssniff was throwing false positives in certain cases when a comment separated atryfrom thecatchblock. #29 - :bug: The
ForbiddenNamesAsInvokedFunctionssniff was incorrectly reportinginstanceofas being introduced in PHP 5.4 while it has been around since PHP 5.0. #80 - :white_check_mark: Compatibility with PHPCS 2.0 - 2.3. #63, #65
Credits
Thanks go out to Daniel JΓ€necke, [Declan Kelly], [Dominic], [Jaap van Otterdijk], [Marin Crnkovic], [Mark Clements], [Nick Pack], [Oliver Klee], [Rowan Collins] and [Sam Van der Borght] for their contributions to this version. :clap:
- :star2: New:
-
v5.5 Changes
April 04, 2014π First tagged release.
π See all related issues and PRs in the 5.5 milestone.
π [Unreleased]: https://github.com/PHPCompatibility/PHPCompatibility/compare/master...HEAD