Skip to content

1.2.0 Remove marketplace standard until it is compatible with PHPCS3 #2

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

Merged
merged 1 commit into from
Nov 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
# Introduction

This is the MediaCT coding standard for Magento 2 projects. It is a mix of the
default MediaCT coding standard and the Magento marketplace standard.

Some tests have been removed from both of the standards to create a workable
and fast standard.
This is the MediaCT coding standard for Magento 2 projects. It is based on
the default MediaCT coding standard but some tests have been removed to create
a workable and fast standard.

# Installation

Use composer to require the standard in a project.

```shell
$ composer require --dev mediact/coding-standard-magento2
composer require --dev mediact/coding-standard-magento2
```

To let PHPCS know that this standard should be used add a phpcs.xml file in the
Expand All @@ -30,12 +28,12 @@ The recommended way to enable the coding standard in PHPStorm and automatic
testing is by requiring the MediaCT testing suite in a project.

```shell
$ composer require --dev mediact/testing-suite
composer require --dev mediact/testing-suite
```

For more information go to [MediaCT Testing Suite](https://github.com/mediact/testing-suite).

# Contribution guidelines

Contributions are welcome. Please create pull requests which add or remove
tests.
tests.
13 changes: 1 addition & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,12 @@
"email": "contact@mediact.nl"
}
],
"repositories": [
{
"type": "composer",
"url": "https://composer.mediact.nl"
},
{
"type": "composer",
"url": "https://repo.magento.com"
}
],
"require": {
"magento/marketplace-eqp": "^1.0",
"mediact/coding-standard": "@stable"
},
"autoload": {
"psr-0": {
"MediactMagento2": "src/MediactMagento2"
}
}
}
}
33 changes: 2 additions & 31 deletions src/MediactMagento2/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* https://www.mediact.nl
*/
-->
<ruleset name="Mediact/Magento1">
<description>MediaCT coding standards for Magento1.</description>
<ruleset name="Mediact/Magento2">
<description>MediaCT coding standards for Magento2.</description>
<arg name="colors" />
<arg name="extensions" value="php/PHP,phtml/PHP,js/JS,css/CSS" />

Expand All @@ -25,35 +25,6 @@
<exclude name="Generic.PHP.Syntax"/>
</rule>

<!-- Base rules on Magento Marketplace -->
<rule ref="../../../../magento/marketplace-eqp/MEQP1">
<exclude name="MEQP1.Classes"/>
<exclude name="MEQP1.PHP.PrivateClassMember"/>
<exclude name="MEQP1.Exceptions.DirectThrow"/>
<exclude name="MEQP1.PHP.Syntax"/>
<exclude name="MEQP1.Security.Acl"/>
<exclude name="MEQP1.Security.Superglobal"/>
<exclude name="MEQP1.Classes.ObjectInstantiation"/>
<exclude name="MEQP1.Stdlib.DateTime"/>
<exclude name="MEQP1.SQL.MissedIndexes"/>
<exclude name="MEQP1.SQL.SlowQuery"/>
<exclude name="MEQP1.Security.DiscouragedFunction" />
<exclude name="MEQP1.Performance.Loop" />
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman" />
<exclude name="Zend.NamingConventions.ValidVariableName.PrivateNoUnderscore"/>
</rule>
<rule ref="../../../../magento/marketplace-eqp/MEQP2">
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket"/>
<exclude name="MEQP2.PHP.Syntax"/>
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.Found"/>
</rule>

<rule ref="Squiz.PHP.CommentedOutCode">
<properties>
<property name="maxPercentage" value="80"/>
</properties>
</rule>
<rule ref="Generic.Files.LineLength.TooLong">
<exclude-pattern>*.phtml</exclude-pattern>
</rule>
Expand Down