Description
The following code:
<?php
trait SimpleTrait
{
private function foo() {}
}
class TraitFixtureWithFinalAndProtected
{
use SimpleTrait {
foo as final protected;
}
}
$rm = new ReflectionMethod(TraitFixtureWithFinalAndProtected::class, 'foo');
var_dump($rm->isFinal());
var_dump($rm->isPrivate());
var_dump($rm->isProtected());
var_dump($rm->isPublic());
Resulted in this output:
bool(false)
bool(true)
bool(false)
bool(false)
But I expected this output instead:
bool(true)
bool(false)
bool(true)
bool(false)
Looks like as final protected is completely ignored, does not change the method but does not throw an error either.
Related to: #12854
PHP Version
PHP 8.3
Operating System
No response