Skip to content

fix: Add code as a named argument#6062

Merged
TomasVotruba merged 1 commit intorectorphp:mainfrom
nikolicaleksa:fix/throw-with-previous-exception-code-named-argument
Jun 27, 2024
Merged

fix: Add code as a named argument#6062
TomasVotruba merged 1 commit intorectorphp:mainfrom
nikolicaleksa:fix/throw-with-previous-exception-code-named-argument

Conversation

@nikolicaleksa
Copy link
Copy Markdown
Contributor

@nikolicaleksa nikolicaleksa commented Jun 27, 2024

@samsonasik
Copy link
Copy Markdown
Member

you can update PR description with

Fixes https://github.com/rectorphp/rector/issues/8698

to automatically close the issue when PR got merged.

@TomasVotruba
Copy link
Copy Markdown
Member

How would this work on PHP 7.4?

@nikolicaleksa
Copy link
Copy Markdown
Contributor Author

How would this work on PHP 7.4?

I think it should not be a problem as we are not always adding the named parameter, it's based on condition $shouldUseNamedArguments = $messageArgument->name !== null; which for PHP 7.4 would always evaluate to false

@TomasVotruba
Copy link
Copy Markdown
Member

I see, looks good then 👍

@TomasVotruba TomasVotruba merged commit 4841e57 into rectorphp:main Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ThrowWithPreviousExceptionRector not using named argument for code

3 participants