-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
rectorphp/rector-src
#7904Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | 2.3.7 |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/9ae08865-9653-46a8-a145-5a0be3b7078c
<?php
interface WithConstInterface {
public const NAME='undefined';
}
class Option1 implements WithConstInterface {
public const NAME='OPTION-1';
}
class Option2 implements WithConstInterface {
public const NAME='OPTION-2';
}
final class OptionProcessor {
public function run(WithConstInterface $option): string
{
return $option::NAME;
}
}Responsible rules
VariableConstFetchToClassConstFetchRector
Expected Behavior
// no change
Rector should not update constants which are not declared final.
Reactions are currently unavailable