[php-src] Issue #15140: Signature of abstract set hook not enforced

From: Date: Sun, 28 Jul 2024 16:52:21 +0000
Subject: [php-src] Issue #15140: Signature of abstract set hook not enforced
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247387@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/15140 Author: nikic ### Description The following code: ```php <?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_

« previous php.bugs (#247387) next »