Version: v0.1.23
Rector-Rule incorrectly transforms sprintf calls into named arguments using non-existent parameter names like values1.
sprintf(format: $message, values1: $property)
In PHP (including the latest version 8.4), sprintf is defined with a variadic parameter:
function sprintf(string $format, mixed ...$values): string.
The $values part collects all trailing arguments into an array. There is no parameter explicitly named $values1. Attempting to run the Rector-generated code results in a fatal error:
Fatal error: Uncaught Error: Unknown named parameter $values1
Version: v0.1.23
Rector-Rule incorrectly transforms sprintf calls into named arguments using non-existent parameter names like values1.
In PHP (including the latest version 8.4), sprintf is defined with a variadic parameter:
function sprintf(string $format, mixed ...$values): string.
The $values part collects all trailing arguments into an array. There is no parameter explicitly named $values1. Attempting to run the Rector-generated code results in a fatal error:
Fatal error: Uncaught Error: Unknown named parameter $values1