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
@DamImpr
Copy link
Copy Markdown
Author

DamImpr commented May 17, 2026

@matthiasblaesing I've merged the commits and reopened the PR as requested (previous PR #9234)

@matthiasblaesing matthiasblaesing added PHP [ci] enable extra PHP tests (php/php.editor) ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels May 17, 2026
@matthiasblaesing matthiasblaesing added this to the NB31 milestone May 17, 2026
@apache apache locked and limited conversation to collaborators May 17, 2026
@apache apache unlocked this conversation May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) PHP [ci] enable extra PHP tests (php/php.editor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants