[PHP] FIXES #9171 Return type not added to constructor override#9234
[PHP] FIXES #9171 Return type not added to constructor override#9234DamImpr wants to merge 1 commit intoapache:masterfrom
Conversation
|
Good job! very useful |
|
@DamImpr thanks for taking are and working on this. The CI/CD run showed errors. The execution fails in the From reading the code the problem is, that The tests can be run from the IDE by opening the context menu of the project and choose Test there. Be warned: The PHP test suite is extensive. The runs on github take in the range of 45-60 minutes. You can run individual test files be invoking "Test file" on the corresponding java file or the context menu when the file is open. You can also run individual tests be using "Run focused test method from the context menu when you click inside the method body. It would be good if you could add a testcase for the expected behavior.
|
As reported in issue #9171 adding the return type to the constructor in a PHP project caused a conflict with the ‘override methods’ feature, making the code incompatible with PHP inheritance rules.
This PR removes the return type from the constructor, restoring compatibility with PHP conventions and resolving the reported bug.
Effect: the constructor can now be correctly overridden in child classes, as expected by the language.