Bug Report
| Subject |
Details |
| Rector version |
last dev-main, tested also with last stable (2.6.3) |
| Installed as |
composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/f8dfec20-c300-4c89-8aca-356997ac7ef9
<?php
use Symfony\Component\Console\Command\Command;
class ExampleCommand extends Command
{
public function __construct(private readonly string $description) {}
public function configure(): void
{
$this->setDescription($this->description);
}
}
Responsible rules
CommandConfigureToAttributeRector
Expected Behavior
No change expected, because $this->description is a dynamic value and cannot be passed to an attribute.
I've already opened #1054 with this example as a fixture.
Bug Report
Minimal PHP Code Causing Issue
See https://getrector.com/demo/f8dfec20-c300-4c89-8aca-356997ac7ef9
Responsible rules
CommandConfigureToAttributeRectorExpected Behavior
No change expected, because
$this->descriptionis a dynamic value and cannot be passed to an attribute.I've already opened #1054 with this example as a fixture.