-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Description
Description
The following code:
https://3v4l.org/lFFsD
Resulted in this output:
Fatal error: Uncaught Error: Call to protected method ParentClass::doSomething() from scope ChildClass in /in/lFFsD:25
Stack trace:
#0 /in/lFFsD(29): ChildClass->__construct()
#1 {main}
thrown in /in/lFFsD on line 25
Process exited with code 255.
But I expected this output instead:
FOO (result of method of parent trait)
The order of the used traits does matter since 8.3.8 and 8.2.20.
As seen in the 3v4l example, the trait TraitA
, which implements the method is used after the TraitB
, which declares the abstract method.
The order of the traits does not matter, if the child class directly uses the traits.
This commit may relate to the issue ?
PHP Version
8.3.8
Operating System
No response
cyl3x, FlorianKe, Bird87ZA, mstegmeyer, sguder and 4 more