Skip to content

Consider changing Composer package type to "phpcodesniffer-standard" - #51

Closed
rodrigoprimo wants to merge 248 commits into
nette:masterfrom
rodrigoprimo:fix/composer-type
Closed

Consider changing Composer package type to "phpcodesniffer-standard"#51
rodrigoprimo wants to merge 248 commits into
nette:masterfrom
rodrigoprimo:fix/composer-type

Conversation

@rodrigoprimo

Copy link
Copy Markdown

This PR suggests changing the Composer package type to enable automatic standard registration via the PHPCSStandards Composer installer plugin.

Problem/Motivation

Composer allows declaring a package's type. When no type is declared, the default is "library".

There is a Composer plugin that can install custom PHP_CodeSniffer standards: https://github.com/PHPCSStandards/composer-installer

This plugin is part of the PHPCSStandards organisation, which is the new official home of PHP_CodeSniffer.

For this installer to work, the package type needs to be set to phpcodesniffer-standard.

There are already over 470 packages that use this type. As a side benefit, using this type will allow end-users to more easily find other external PHP_CodeSniffer standards that may be interesting to them when searching on Packagist.

Proposed changes

Add "type": "phpcodesniffer-standard" to composer.json.

This will in no way change the existing behavior of this package for users that do not include the Composer plugin mentioned above in their projects' composer.json.

TomasVotruba and others added 30 commits May 15, 2017 00:28
setting up few basic rules
* travis: add --fix option to make sure it works (experimental)

* [examples+cs] add elements visibility, lowercase elements and method arguments checker

* [cs] add various checkers, link topics to docs to make it easy to find origin

* [cs] drop consecutive lines checker, breaks 2 lines before class

* [cs] disable braces fixer, buggy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.