Skip to content

Commit

Permalink
Merge pull request #920 from PHPCompatibility/develop
Browse files Browse the repository at this point in the history
Release version 9.3.2
  • Loading branch information
wimg committed Oct 16, 2019
2 parents 9999344 + 6b364f8 commit bfca2be
Show file tree
Hide file tree
Showing 222 changed files with 302 additions and 1,027 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Pull requests

Contributions in the form of pull requests are very welcome.

To start contributing, fork the repository, create a new branch in your fork, make your intended changes and pull the branch against the `master` branch of this repository.
To start contributing, fork the repository, create a new branch in your fork, make your intended changes and pull the branch against the `develop` branch of this repository.

Please make sure that your pull request contains unit tests covering what's being addressed by it.

Expand Down
26 changes: 25 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,28 @@ From version 8.0.0 onwards, [Semantic Versioning](http://semver.org/) is used.

_Nothing yet._

## [9.3.2] - 2019-10-16

See all related issues and PRs in the [9.3.2 milestone].

### Added
- :star: `PHPCompatibility.Constants.NewConstants` sniff: detection of the PHP 7.2 `SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13` constant. [#915](https://github.com/PHPCompatibility/PHPCompatibility/pull/915)
- :books: Readme: a list of projects which are build upon or extend PHPCompatibility. [#904](https://github.com/PHPCompatibility/PHPCompatibility/pull/904)

### Changed
- :pushpin: `PHPCompatibility.FunctionNameRestrictions.RemovedPHP4StyleConstructors`: minor efficiency fix to make the sniff faster. [#912](https://github.com/PHPCompatibility/PHPCompatibility/pull/912)
- :pushpin: `PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames`: functions marked as `@deprecated` in the function docblock will now be ignored by this sniff. [#917](https://github.com/PHPCompatibility/PHPCompatibility/pull/917)
- :pencil: `PHPCompatibility.FunctionDeclarations.ForbiddenToStringParameters`: the `$ooScopeTokens` property is now `protected`, it should never have been `public` in the first place. [#907](https://github.com/PHPCompatibility/PHPCompatibility/pull/907)
- :recycle: More code documentation fixes. [#903](https://github.com/PHPCompatibility/PHPCompatibility/pull/903), [#916](https://github.com/PHPCompatibility/PHPCompatibility/pull/916)
- :books: Readme/Contributing: various tweaks. [#904](https://github.com/PHPCompatibility/PHPCompatibility/pull/904), [#905](https://github.com/PHPCompatibility/PHPCompatibility/pull/905)

### Fixed
- :bug: `PHPCompatibility.FunctionUse.OptionalToRequiredFunctionParameters`: false positive when a class is instantiated which has the same name as one of the affected functions. [#914](https://github.com/PHPCompatibility/PHPCompatibility/pull/914)
- :bug: `PHPCompatibility.FunctionUse.RequiredToOptionalFunctionParameters`: false positive when a class is instantiated which has the same name as one of the affected functions. [#914](https://github.com/PHPCompatibility/PHPCompatibility/pull/914)
- :bug: `PHPCompatibility.MethodUse.NewDirectCallsToClone`: false positive on calling `__clone()` from within the class being cloned [#910](https://github.com/PHPCompatibility/PHPCompatibility/pull/910)
- :bug: `PHPCompatibility.Miscellaneous.ValidIntegers`: binary numbers using an uppercase `B` were not always recognized correctly. [#909](https://github.com/PHPCompatibility/PHPCompatibility/pull/909)


## [9.3.1] - 2019-09-06

See all related issues and PRs in the [9.3.1 milestone].
Expand Down Expand Up @@ -72,7 +94,7 @@ The `10.0.0` release is expected around the same time as the release of PHP 7.4
- :star: `PHPCompatibility.FunctionUse.RemovedFunctions` sniff: recognize the PHP 7.4 deprecated `convert_cyr_string()()`, `ezmlm_hash()`, `get_magic_quotes_gpc()`, `get_magic_quotes_runtime()`, `hebrevc()`, `is_real()`, `money_format()` and `restore_include_path()` functions. [#847](https://github.com/PHPCompatibility/PHPCompatibility/pull/847)
- :star: `PHPCompatibility.IniDirectives.NewIniDirectives` sniff: detect use of the new PHP 7.4 `zend.exception_ignore_args` ini directive. [#871](https://github.com/PHPCompatibility/PHPCompatibility/pull/871)
- :star: `PHPCompatibility.IniDirectives.RemovedIniDirectives` sniff: detect use of the `allow_url_include` ini directive which is deprecated as of PHP 7.4. [#870](https://github.com/PHPCompatibility/PHPCompatibility/pull/870)
- :star: `PHPCompatibility.IniDirectives.RemovedIniDirectives` sniff: detection of use of the `opcache.load_comments` directive which was removed in PHP 7.0. [#v](https://github.com/PHPCompatibility/PHPCompatibility/pull/883)
- :star: `PHPCompatibility.IniDirectives.RemovedIniDirectives` sniff: detection of use of the `opcache.load_comments` directive which was removed in PHP 7.0. [#883](https://github.com/PHPCompatibility/PHPCompatibility/pull/883)
- :star: `PHPCompatibility.ParameterValues.NewHashAlgorithms`: recognize use of the new PHP 7.4 `crc32c` hash algorithm. [#872](https://github.com/PHPCompatibility/PHPCompatibility/pull/872)
- :star: `PHPCompatibility.TypeCasts.RemovedTypeCasts` sniff: detect usage of the `(real)` type cast which will be deprecated in PHP 7.4. [#844](https://github.com/PHPCompatibility/PHPCompatibility/pull/844)
- :star: Recognize the `recode` extension functionality which will be removed in PHP 7.4 (moved to PECL) in the `RemovedExtensions` and `RemovedFunctions` sniffs. [#841](https://github.com/PHPCompatibility/PHPCompatibility/pull/841)
Expand Down Expand Up @@ -1321,6 +1343,7 @@ See all related issues and PRs in the [5.5 milestone].


[Unreleased]: https://github.com/PHPCompatibility/PHPCompatibility/compare/master...HEAD
[9.3.2]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.3.1...9.3.2
[9.3.1]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.3.0...9.3.1
[9.3.0]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.2.0...9.3.0
[9.2.0]: https://github.com/PHPCompatibility/PHPCompatibility/compare/9.1.1...9.2.0
Expand Down Expand Up @@ -1348,6 +1371,7 @@ See all related issues and PRs in the [5.5 milestone].
[7.0]: https://github.com/PHPCompatibility/PHPCompatibility/compare/5.6...7.0
[5.6]: https://github.com/PHPCompatibility/PHPCompatibility/compare/5.5...5.6

[9.3.2 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/31
[9.3.1 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/30
[9.3.0 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/29
[9.2.0 milestone]: https://github.com/PHPCompatibility/PHPCompatibility/milestone/28
Expand Down
6 changes: 1 addition & 5 deletions PHPCompatibility/AbstractComplexVersionSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
use PHP_CodeSniffer_File as File;

/**
* \PHPCompatibility\AbstractComplexVersionSniff.
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
* Abstract base class for sniffs based on complex arrays with PHP version information.
*/
abstract class AbstractComplexVersionSniff extends Sniff implements ComplexVersionInterface
{
Expand Down
6 changes: 0 additions & 6 deletions PHPCompatibility/AbstractFunctionCallParameterSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@
use PHP_CodeSniffer_Tokens as Tokens;

/**
* \PHPCompatibility\AbstractFunctionCallParameterSniff.
*
* Abstract class to use as a base for examining the parameter values passed to function calls.
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
*/
abstract class AbstractFunctionCallParameterSniff extends Sniff
{
Expand Down
6 changes: 1 addition & 5 deletions PHPCompatibility/AbstractNewFeatureSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
use PHP_CodeSniffer_File as File;

/**
* \PHPCompatibility\AbstractNewFeatureSniff.
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
* Base class for new feature sniffs.
*/
abstract class AbstractNewFeatureSniff extends AbstractComplexVersionSniff
{
Expand Down
6 changes: 1 addition & 5 deletions PHPCompatibility/AbstractRemovedFeatureSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
use PHP_CodeSniffer_File as File;

/**
* \PHPCompatibility\AbstractRemovedFeatureSniff.
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
* Base class for removed feature sniffs.
*/
abstract class AbstractRemovedFeatureSniff extends AbstractComplexVersionSniff
{
Expand Down
6 changes: 1 addition & 5 deletions PHPCompatibility/ComplexVersionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
use PHP_CodeSniffer_File as File;

/**
* \PHPCompatibility\ComplexVersionInterface.
* Complex Version Interface.
*
* Interface to be implemented by sniffs using a multi-dimensional array of
* PHP features (functions, classes etc) being sniffed for with version
* information in sub-arrays.
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
*/
interface ComplexVersionInterface
{
Expand Down
6 changes: 0 additions & 6 deletions PHPCompatibility/PHPCSHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@
use PHP_CodeSniffer_Tokens as Tokens;

/**
* \PHPCompatibility\PHPCSHelper
*
* PHPCS cross-version compatibility helper class.
*
* A number of PHPCS classes were split up into several classes in PHPCS 3.x
* Those classes cannot be aliased as they don't represent the same object.
* This class provides helper methods for functions which were contained in
* one of these classes and which are used within the PHPCompatibility library.
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
*/
class PHPCSHelper
{
Expand Down
7 changes: 1 addition & 6 deletions PHPCompatibility/Sniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@
use PHP_CodeSniffer_Tokens as Tokens;

/**
* \PHPCompatibility\Sniff.
*
* @category PHP
* @package PHPCompatibility
* @author Wim Godden <wim.godden@cu.be>
* @copyright 2014 Cu.be Solutions bvba
* Base class from which all PHPCompatibility sniffs extend.
*/
abstract class Sniff implements PHPCS_Sniff
{
Expand Down
6 changes: 0 additions & 6 deletions PHPCompatibility/Sniffs/Classes/NewAnonymousClassesSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@
use PHP_CodeSniffer_Tokens as Tokens;

/**
* \PHPCompatibility\Sniffs\Classes\NewAnonymousClasses.
*
* Anonymous classes are supported in PHP 7.0
*
* PHP version 7.0
*
* @category PHP
* @package PHPCompatibility
* @author Wim Godden <wim.godden@cu.be>
*/
class NewAnonymousClassesSniff extends Sniff
{
Expand Down
7 changes: 1 addition & 6 deletions PHPCompatibility/Sniffs/Classes/NewClassesSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@
use PHP_CodeSniffer_File as File;

/**
* \PHPCompatibility\Sniffs\Classes\NewClassesSniff.
*
* @category PHP
* @package PHPCompatibility
* @author Wim Godden <wim.godden@cu.be>
* @copyright 2013 Cu.be Solutions bvba
* Detect use of new PHP native classes.
*/
class NewClassesSniff extends AbstractNewFeatureSniff
{
Expand Down
6 changes: 0 additions & 6 deletions PHPCompatibility/Sniffs/Classes/NewConstVisibilitySniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@
use PHP_CodeSniffer_Tokens as Tokens;

/**
* \PHPCompatibility\Sniffs\Classes\NewConstVisibility.
*
* Visibility for class constants is available since PHP 7.1.
*
* PHP version 7.1
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
*/
class NewConstVisibilitySniff extends Sniff
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@
use PHP_CodeSniffer_Tokens as Tokens;

/**
* \PHPCompatibility\Sniffs\Classes\NewLateStaticBindingSniff.
* Detect use of late static binding as introduced in PHP 5.3.
*
* PHP version 5.3
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
*/
class NewLateStaticBindingSniff extends Sniff
{
Expand Down
10 changes: 5 additions & 5 deletions PHPCompatibility/Sniffs/Constants/NewConstantsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
use PHP_CodeSniffer_File as File;

/**
* \PHPCompatibility\Sniffs\Constants\NewConstantsSniff.
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
* Detect use of new PHP native global constants.
*/
class NewConstantsSniff extends AbstractNewFeatureSniff
{
Expand Down Expand Up @@ -2836,6 +2832,10 @@ class NewConstantsSniff extends AbstractNewFeatureSniff
'7.1' => false,
'7.2' => true,
),
'SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13' => array(
'7.1' => false,
'7.2' => true,
),
'SODIUM_CRYPTO_PWHASH_ALG_DEFAULT' => array(
'7.1' => false,
'7.2' => true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@
use PHP_CodeSniffer_Tokens as Tokens;

/**
* \PHPCompatibility\Sniffs\Constants\NewMagicClassConstantSniff.
*
* The special ClassName::class constant is available as of PHP 5.5.0, and allows for
* fully qualified class name resolution at compile.
*
* PHP version 5.5
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
*/
class NewMagicClassConstantSniff extends Sniff
{
Expand Down
6 changes: 1 addition & 5 deletions PHPCompatibility/Sniffs/Constants/RemovedConstantsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
use PHP_CodeSniffer_File as File;

/**
* \PHPCompatibility\Sniffs\Constants\RemovedConstantsSniff.
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
* Detect use of deprecated and/or removed PHP native global constants.
*/
class RemovedConstantsSniff extends AbstractRemovedFeatureSniff
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@
use PHP_CodeSniffer_Tokens as Tokens;

/**
* \PHPCompatibility\Sniffs\ControlStructures\DiscouragedSwitchContinue.
*
* PHP 7.3 will throw a warning when continue is used to target a switch control structure.
*
* PHP version 7.3
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
*/
class DiscouragedSwitchContinueSniff extends Sniff
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,9 @@
use PHP_CodeSniffer_File as File;

/**
* \PHPCompatibility\Sniffs\ControlStructures\ForbiddenBreakContinueOutsideLoop.
*
* Forbids use of break or continue statements outside of looping structures.
*
* PHP version 7.0
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
*/
class ForbiddenBreakContinueOutsideLoopSniff extends Sniff
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,9 @@
use PHP_CodeSniffer_Tokens as Tokens;

/**
* \PHPCompatibility\Sniffs\ControlStructures\ForbiddenBreakContinueVariableArguments.
*
* Forbids variable arguments on break or continue statements.
*
* PHP version 5.4
*
* @category PHP
* @package PHPCompatibility
* @author Wim Godden <wim.godden@cu.be>
* @copyright 2012 Cu.be Solutions bvba
*/
class ForbiddenBreakContinueVariableArgumentsSniff extends Sniff
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,9 @@
use PHP_CodeSniffer_File as File;

/**
* \PHPCompatibility\Sniffs\ControlStructures\ForbiddenSwitchWithMultipleDefaultBlocksSniff.
*
* Switch statements can not have multiple default blocks since PHP 7.0
*
* PHP version 7.0
*
* @category PHP
* @package PHPCompatibility
* @author Wim Godden <wim@cu.be>
*/
class ForbiddenSwitchWithMultipleDefaultBlocksSniff extends Sniff
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
use PHP_CodeSniffer_Tokens as Tokens;

/**
* \PHPCompatibility\Sniffs\ControlStructures\NewExecutionDirectivesSniff.
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
* Check for valid execution directives set with `declare()`.
*/
class NewExecutionDirectivesSniff extends AbstractNewFeatureSniff
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
* can be referenced (i.e. if it is a variable).
*
* PHP version 5.5
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
*/
class NewForeachExpressionReferencingSniff extends Sniff
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
* Detect unpacking nested arrays with list() in a foreach().
*
* PHP version 5.5
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
*/
class NewListInForeachSniff extends Sniff
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,9 @@
use PHP_CodeSniffer_File as File;

/**
* \PHPCompatibility\Sniffs\ControlStructures\NewMultiCatch.
*
* Catching multiple exception types in one statement is available since PHP 7.1.
*
* PHP version 7.1
*
* @category PHP
* @package PHPCompatibility
* @author Juliette Reinders Folmer <phpcompatibility_nospam@adviesenzo.nl>
*/
class NewMultiCatchSniff extends Sniff
{
Expand Down

0 comments on commit bfca2be

Please sign in to comment.