Description
The following code:
<?php
trait T {
public abstract function test();
}
class P {
private function test() {}
}
class C extends P {
use T;
}
This passes without errors. There's an intentional BC layer that skips visibility checks for abstract trait methods (see Zend/tests/traits/abstract_method_4.phpt). However, this should not include private parent methods, because the trait cannot call those. The whole BC layer is questionable today, so it might be better to remove it entirely.
PHP Version
All supported branches
Operating System
No response
Description
The following code:
This passes without errors. There's an intentional BC layer that skips visibility checks for abstract trait methods (see Zend/tests/traits/abstract_method_4.phpt). However, this should not include private parent methods, because the trait cannot call those. The whole BC layer is questionable today, so it might be better to remove it entirely.
PHP Version
All supported branches
Operating System
No response