-
Notifications
You must be signed in to change notification settings - Fork 160
Require const
visibility
#174
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
Comments
I really like this idea but the reason behind this is supported versions. Constants visibility was introduces in PHP The idea of coding standard was to have unified set of rules across all release lines. However we had some discussions about version specific rules #17 |
But... We are not going to support |
This standard is used for Magento Marketplace extensions verification and i believe patch versions of |
@lenaorobei Do you think that we can proceed with the rule now? |
Hi @lbajsarowicz, Tagging @vkublytskyi and @roribio who are in charge of Magento Marketplace Extensions Quality Program. Do we still check 2.2.x extensions? |
Hi! Good improvement for coding standards! And thank you for notifying us. At the current moment, Magento Developer Portal still allows submitting extension with declared 2.2 compatibility for Magento Commerce and Magento Commerce Cloud (Magento Open Source allows to specify compatibility only with 2.3 and 2.4 release lines). Therefore we still run tests on obsolete PHP versions to verify declared compatibility with Magento Commerce 2.2. As Magento 2.4.0 was recently released we are starting the process of fully dropping Magento 2.2 support on Magento Developer Portal. Therefore, I would like to ask you to postpone with merging this rule until we complete that work. I added an internal ticket (MS-7888) to ensure that PR for this issue will be merged in the scope of removal Magento 2.2 from all systems related to submissions of new extensions to Magento Marketplace. |
@sivaschenko, can it be approved and implemented? |
@ihor-sviziev this is a good proposition. I don't see any reason not to implement this rule. |
@magento I am working on this |
…coding-standard-386 [Imported] AC-1879: Magento2/Sniffs/Legacy/ObsoleteResponseSniff.php issue
Rule
Currently
const
are declared without visibility:https://github.com/magento/magento2/blob/78bb169ff9721c8d05c35b4c29a4464fd45bccbe/app/code/Magento/Catalog/Model/Product.php#L54-L73
I suggest extending Coding Standard to require visibility - for example:
Reason
const
should be explicit if we can use them as a reference or it's declaration is only internal.Implementation
N/A
The text was updated successfully, but these errors were encountered: