Skip to content

[Problem] Namespace conflict with core rules #45

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

Closed
lenaorobei opened this issue Feb 28, 2019 · 2 comments · Fixed by #61
Closed

[Problem] Namespace conflict with core rules #45

lenaorobei opened this issue Feb 28, 2019 · 2 comments · Fixed by #61
Assignees
Labels
accepted New rule is accepted proposal New rule proposal

Comments

@lenaorobei
Copy link
Contributor

Problem overview

The future direction of magento/magento-coding-standard project is to deliver unified Coding Standard to the Magento core.
For backward compatibility dev/tests/static/framework/Magento/ruleset.xml should not be removed. In this case both coding standards will have name Magento and PHP CodeSniffer will be not able to process it.

Solution

Rename Magento magento/magento-coding-standard to MagentoCS. So dev/tests/static/framework/Magento/ruleset.xml will look like:

<ruleset name="Magento">
    <description>Custom Magento coding standard.</description>
    <rule ref="MagentoCS"/>
</ruleset>
@lenaorobei lenaorobei added proposal New rule proposal need to discuss Rule requires discussion labels Feb 28, 2019
@paliarush
Copy link
Contributor

How about Magento2 ? Usually coding standards do not have CS suffix, e.g. PSR2

@lenaorobei lenaorobei added accepted New rule is accepted and removed need to discuss Rule requires discussion labels Mar 13, 2019
@lenaorobei lenaorobei self-assigned this Mar 13, 2019
@orlangur
Copy link

@lenaorobei,

For backward compatibility dev/tests/static/framework/Magento/ruleset.xml should not be removed

Please provide a rule among https://devdocs.magento.com/guides/v2.3/contributor-guide/backward-compatible-development/ applicable to this case.

Magento2 is definitely not a proper vendor name and goes against any proper versioning policy, including you recent proposal. Currently https://github.com/magento/magento-coding-standard is quite confusing as it contains "Magento Coding Standard" and "Magento2 Coding Standard" on the same page.

magento-devops-reposync-svc pushed a commit that referenced this issue Sep 1, 2021
…-coding-standard-250

[Imported] AC-954: Create unit test for Magento2\Less\TypeSelectorsSniff check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted New rule is accepted proposal New rule proposal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants