You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rector\CodeQuality\Rector\ClassMethod\OptionalParametersAfterRequiredRector switched the position of two parameters in the method signature but did not modify the docblock's @param order.
This was a TYPO3 system which uses symfony's dependency injection, and this prefers docblocks over method parameters. So the DI called the method with the wrong parameter order because of the discrepancy between docblock and signature.
/**
* @param ?string $position Position as "lat,lon": 53.550967,9.993084
* @param ?int $distance Distance in meters
*/
public function findAction(?int $distance, ?string $position = null): ResponseInterface
{
I don't know if modifying docblocks is out of scope for rector.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Rector\CodeQuality\Rector\ClassMethod\OptionalParametersAfterRequiredRector
switched the position of two parameters in the method signature but did not modify the docblock's@param
order.This was a TYPO3 system which uses symfony's dependency injection, and this prefers docblocks over method parameters. So the DI called the method with the wrong parameter order because of the discrepancy between docblock and signature.
I don't know if modifying docblocks is out of scope for rector.
Beta Was this translation helpful? Give feedback.
All reactions