Closed
Description
Description
The following code:
<?php
interface I {
public string $prop {
set(int|string $value);
}
}
class C implements I {
public string $prop;
}
Currently does not produce an error, but should, because the implementing class does not satisfy the set(int|string)
constraint.
Alternatively, explicitly specifying the set parameter in an abstract hook could be forbidden.
PHP Version
PHP 8.4 (a7d856)
Operating System
No response