-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Use constructor property promotion in module Ui #37032
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
base: 2.4-develop
Are you sure you want to change the base?
Use constructor property promotion in module Ui #37032
Conversation
Replace allmost all properties with constructor property promotion in module Ui: https://stitcher.io/blog/constructor-promotion-in-php-8 * Readable code * Make Magento less complex by removing properties which take up a lot of lines. * Imported all classes to make code more readable. I think the code would be a lot cleaner if all modules start using constructor promotions, since of 2.4.6 php 7.4 is dropped we can now make use of it. So let's start on it right now :).
Hi @leonhelmus. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@ihor-sviziev I get a lot of warnings in test Semantic Version Checker that it's a major patch, but the protected property still exists except now it's a constructor property promotion. Do you know what im doing wrong? I ask you since you ran my last test in #37026 |
I think svc check isn’t supporting the constructor property promotions yet
…On Wed, 8 Mar 2023 at 20:17 leonhelmus ***@***.***> wrote:
@ihor-sviziev <https://github.com/ihor-sviziev> I get a lot of warnings
in test Semantic Version Checker that it's a major patch, but the protected
property still exists except now it's a constructor property promotion. Do
you know what im doing wrong? I ask you since you ran my last test in
#37026 <#37026>
—
Reply to this email directly, view it on GitHub
<#37032 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOJOUIAFRKDN2LB4KCS7UTW3DEMTANCNFSM6AAAAAAVTUQJQ4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@ihor-sviziev ah alright, so for now I can ignore it? BTW if you have any advice for me on how to get these merged please let me know. I'm currently on 20 + modules so I'm going through all of them. I think this could reduce the amount of lines by a LOT. So its a nice way to make Magento more readable/smaller. It would be nice if we could add this check in coding standards Magento. Or is that to soon? Last question hehe, how do i add the label described here: Im working for the company Youwe. So i want to add the labels "partners-contribution" & "Partner: Youwe". How to add this i cannot seem to do it myself and i'm not sure where to request this? |
Description (*)
Replace allmost all properties with constructor property promotion in module Ui: https://stitcher.io/blog/constructor-promotion-in-php-8
I think the code would be a lot cleaner if all modules start using constructor promotions, since of 2.4.6 php 7.4 is dropped we can now make use of it. So let's start on it right now :).
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)