Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for PHP 8.4 #201

Merged
merged 7 commits into from
Oct 25, 2024
Merged

Add Support for PHP 8.4 #201

merged 7 commits into from
Oct 25, 2024

Conversation

nishant04412
Copy link
Contributor

Q A
Documentation yes/no
Bugfix yes/no
BC Break yes/no
New Feature yes/no
RFC yes/no
QA yes/no

Description

@W0rma
Copy link

W0rma commented Oct 3, 2024

Seems like the PHP 8.4 pipeline is blocked by laminas/laminas-stdlib#118

@nishant04412
Copy link
Contributor Author

Yes and laminas/laminas-stdlib#118 looks to be blocked due to vimeo/psalm#10928

I added a comment laminas/laminas-stdlib#118 (comment) to confirm same. Lets hope dependent PRs get merged soon to unblock this.

@nishant04412
Copy link
Contributor Author

@gsteel I am facing some issues while resolving one of the issue in

public function defaultObjectEqualsNullAndNotOptional(\stdClass $a = null, $b)

Here, if we add ? before \stdClass $a = null then it'll resolve PHP 8.4 related issue but then test is giving deprecation Optional parameter $a declared before required parameter $b is implicitly treated as a required parameter.

Please suggest if we can keep mandatory parameter $b before optional parameter $a in this ? Or any other advise if not.

@gsteel
Copy link
Member

gsteel commented Oct 24, 2024

Please suggest if we can keep mandatory parameter $b before optional parameter $a in this ? Or any other advise if not.

$a is effectively mandatory because $b is and we don't support BC on named parameters, so the signature can be changed to fn(stdClass|null $a, $b) without breaking BC AFAIC. Alternatively, retain the = null and just suppress the CS issue.

Also, this is a Test asset - BC is not a concern.

@samsonasik
Copy link
Member

default null value can be removed if next parameter is required, see

https://3v4l.org/4pQLN

that safe even extended, also, named argument is not used in the test :)

composer.json Outdated Show resolved Hide resolved
@nishant04412
Copy link
Contributor Author

@samsonasik Please review and let me know if clarification or code modification required.

@samsonasik
Copy link
Member

Sign off is needed, read https://github.com/laminas/laminas-code/pull/201/checks?check_run_id=32024385175

Signed-off-by: Nishant Rana <[email protected]>
…deprecated, the explicit nullable type must be used instead

Signed-off-by: Nishant Rana <[email protected]>
…deprecated, the explicit nullable type must be used instead

Signed-off-by: Nishant Rana <[email protected]>
@nishant04412
Copy link
Contributor Author

@gsteel PR changes are approved. Can you please check and merge this PR ?

@gsteel gsteel added this to the 4.15.0 milestone Oct 25, 2024
@gsteel gsteel self-assigned this Oct 25, 2024
Copy link
Member

@gsteel gsteel left a comment

Choose a reason for hiding this comment

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

Thank you @nishant04412

@gsteel gsteel merged commit e8dedb5 into laminas:4.15.x Oct 25, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants