Skip to content

NewPackFormat: add support for named parameters#1381

Merged
wimg merged 1 commit intodevelopfrom
feature/1239-newpackformat-support-named-params
Oct 31, 2022
Merged

NewPackFormat: add support for named parameters#1381
wimg merged 1 commit intodevelopfrom
feature/1239-newpackformat-support-named-params

Conversation

@jrfnl
Copy link
Copy Markdown
Member

@jrfnl jrfnl commented Oct 26, 2022

  1. Adjusted the way the correct parameter is retrieved to use the new PHPCSUtils 1.0.0-alpha4 PassedParameters::getParameterFromStack() 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 reference:

No unit tests have been added as the pack function has a variable number of arguments and therefore doesn't support named parameters.

Related to #1239

1. Adjusted the way the correct parameter is retrieved to use the new PHPCSUtils 1.0.0-alpha4 `PassedParameters::getParameterFromStack()` 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 reference:
* `pack`: https://3v4l.org/2aqYf

No unit tests have been added as the `pack` function has a variable number of arguments and therefore doesn't support named parameters.
@jrfnl jrfnl added this to the 10.0.0 milestone Oct 26, 2022
@jrfnl jrfnl requested a review from wimg October 26, 2022 12:57
@jrfnl jrfnl added Type: enhancement PR: quick merge PR only contains relatively simple changes PR: ready for review labels Oct 26, 2022
@wimg wimg merged commit 128cc92 into develop Oct 31, 2022
@wimg wimg deleted the feature/1239-newpackformat-support-named-params branch October 31, 2022 15:24
@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