Skip to content

[PHP] FIXES #9171 Return type not added to constructor override#9395

Open
DamImpr wants to merge 1 commit into
apache:masterfrom
DamImpr:php_fix_override_constructor
Open

[PHP] FIXES #9171 Return type not added to constructor override#9395
DamImpr wants to merge 1 commit into
apache:masterfrom
DamImpr:php_fix_override_constructor

Conversation

@DamImpr
Copy link
Copy Markdown

@DamImpr DamImpr commented May 16, 2026

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.

… a constructor.

Removed the return type from the constructor in the list of methods to override
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant