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

Apply PHP 8.0 Syntax and constructor promotion #60

Merged
merged 2 commits into from
Dec 10, 2022

Conversation

samsonasik
Copy link
Member

Signed-off-by: Abdul Malik Ikhsan [email protected]

Q A
QA yes

Description

Since composer.json require php 8.0, php 8.0 syntax can constuctor promotion can be applied.

*/
public function __construct($viewRenderer, Options $options)
public function __construct(protected $renderer, Options $options)
Copy link
Member Author

@samsonasik samsonasik Dec 9, 2022

Choose a reason for hiding this comment

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

Yes, $renderer can be promoted property, since both property and parameter type are mixed (not typed)

and Options need to be kept as is as property not typed, and parameter typed.

Ref https://3v4l.org/Ird4g vs https://3v4l.org/bHo6B

Signed-off-by: Abdul Malik Ikhsan <[email protected]>
@samsonasik
Copy link
Member Author

All green 🎉

@samsonasik samsonasik self-assigned this Dec 10, 2022
@samsonasik samsonasik added this to the 2.7.0 milestone Dec 10, 2022
@samsonasik samsonasik merged commit 2e3d39e into laminas:2.7.x Dec 10, 2022
@samsonasik samsonasik deleted the apply-php80 branch December 10, 2022 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant