Skip to content

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

Merged
DanielEScherzer merged 1 commit intoDanielEScherzer:mainfrom
rodrigoprimo:fix/composer-type-phpcodesniffer-standard
Feb 22, 2026
Merged

Consider changing Composer package type to "phpcodesniffer-standard"#7
DanielEScherzer merged 1 commit intoDanielEScherzer:mainfrom
rodrigoprimo:fix/composer-type-phpcodesniffer-standard

Conversation

@rodrigoprimo
Copy link
Contributor

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. This package currently uses "library" as its type.

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

Change the type in composer.json from "library" to "phpcodesniffer-standard".

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.

Copy link
Owner

@DanielEScherzer DanielEScherzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@DanielEScherzer DanielEScherzer merged commit c617bda into DanielEScherzer:main Feb 22, 2026
3 checks passed
@DanielEScherzer
Copy link
Owner

Do I need to make a new release in order for this to become useful/live?

@rodrigoprimo rodrigoprimo deleted the fix/composer-type-phpcodesniffer-standard branch February 23, 2026 20:03
@rodrigoprimo
Copy link
Contributor Author

Yes, a new release would be needed for this change to take effect for users that require a stable version of the package.

Packagist has already picked up the change on dev-main, so users requiring "dev-main" would already get the updated package type. But for anyone using a tagged release, the type in the currently published versions (v0.0.1 and v0.0.2) is still "library".

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.

2 participants