Skip to content

ForbiddenNames: add support for named parameters#1405

Merged
wimg merged 1 commit intodevelopfrom
php-8.0/forbiddennames-support-named-parameters
Nov 4, 2022
Merged

ForbiddenNames: add support for named parameters#1405
wimg merged 1 commit intodevelopfrom
php-8.0/forbiddennames-support-named-parameters

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Nov 2, 2022

  1. Add support for function calls using named parameters by passing the parameter name to the PHPCSUtils 1.0.0-alpha4 PassedParameters::getParameter() method.
  2. Verified the parameter name used is in line with the name as per the PHP 8.0 release. PHP itself renamed a lot of parameters in PHP 8.0. As named parameters did not exist before PHP 8.0, the parameter name as per PHP 8.0 (or above) is the only relevant name.

Name verification references:

Includes adding tests to the "specific situations" test case files using named parameters.

Related to #1239

1. Add support for function calls using named parameters by passing the parameter name to the PHPCSUtils 1.0.0-alpha4 `PassedParameters::getParameter()` method.
2. Verified the parameter name used is in line with the name as per the PHP 8.0 release.
    PHP itself renamed a lot of parameters in PHP 8.0. As named parameters did not exist before PHP 8.0, the parameter name as per PHP 8.0 (or above) is the only relevant name.

Name verification references:
* `define`: https://3v4l.org/JLsqC

Includes adding tests to the "specific situations" test case files using named parameters.
@jrfnl jrfnl added Type: enhancement PR: quick merge PR only contains relatively simple changes PR: ready for review labels Nov 2, 2022
@jrfnl jrfnl added this to the 10.0.0 milestone Nov 2, 2022
@jrfnl jrfnl requested a review from wimg November 2, 2022 22:18
@wimg wimg merged commit f72a92f into develop Nov 4, 2022
@wimg wimg deleted the php-8.0/forbiddennames-support-named-parameters branch November 4, 2022 16:07
@jrfnl jrfnl removed PR: quick merge PR only contains relatively simple changes PR: ready for review labels Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants