Skip to content

Update ConstructorPromotionTest.php#645

Closed
Hamad-Rashid wants to merge 1 commit intophpDocumentor:6.xfrom
Hamad-Rashid:patch-2
Closed

Update ConstructorPromotionTest.php#645
Hamad-Rashid wants to merge 1 commit intophpDocumentor:6.xfrom
Hamad-Rashid:patch-2

Conversation

@Hamad-Rashid
Copy link

the optional parameter $email is declared before a required parameter $birth_date, which is not allowed in PHP 8. In PHP, optional parameters must always come after the required parameters.

the optional parameter $email is declared before a required parameter $birth_date, which is not allowed in PHP 8. In PHP, optional parameters must always come after the required parameters.
@Hamad-Rashid
Copy link
Author

the optional parameter $email is declared before a required parameter $birth_date, which is not allowed in PHP 8. In PHP, optional parameters must always come after the required parameters.

Copy link
Member

@jaapio jaapio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some tests are failing. Can you have a look at those

@AJenbo
Copy link

AJenbo commented Jan 4, 2026

the optional parameter $email is declared before a required parameter $birth_date, which is not allowed in PHP 8. In PHP, optional parameters must always come after the required parameters.

This is not correct, it became valid in PHP 8.0 because of named parameters. Only in 7.4 and older was this invalid. Considering that the project requires PHP 8.1 there shouldn't be a need for this change.

@jaapio
Copy link
Member

jaapio commented Mar 2, 2026

This pr hasn't had any updates since my first comment. I will close this.

@jaapio jaapio closed this Mar 2, 2026
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.

3 participants