Bug Report
| Subject |
Details |
| Rector version |
0.15.0 |
| Installed as |
composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.org/demo/cd6191ec-6e65-4c8c-882f-7e69c3ed6808
<?php
final class ApiClient
{
private readonly string $apiKey;
public function __construct(
#[\SensitiveParameter] string $apiKey,
) {
$this->apiKey = $apiKey;
}
}
Responsible rules
ClassPropertyAssignToConstructorPromotionRector
Expected Behavior
The SensitiveParameter attribute only targets parameters, so constructor arguments with this attribute should not use property promotion.