<?php
trait MyTrait
{
final protected function someMethod(): void {}
}
class Test
{
use MyTrait {
someMethod as private anotherMethod;
}
public function __construct()
{
$this->anotherMethod();
}
}
Warning: Private methods cannot be final as they are never overridden by other classes in /in/YtW3h on line 8