- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 37
Change composer.json type to phpcodesniffer standard
        jrfnl edited this page Sep 10, 2024 
        ·
        1 revision
      
    Composer allows declaring the type of a package. When no
type is declared, the default is "library".
There are various composer plugins that can install (register) external standards with PHP_CodeSniffer:
- 
https://github.com/higidi/composer-phpcodesniffer-standards-plugin(marked as "abandoned" in Packagist).
- https://github.com/DealerDirect/phpcodesniffer-composer-installer
- 
https://github.com/SimplyAdmire/ComposerPlugins(marked as "abandoned" in Packagist).
For these installers to work, the package type needs to be set to "phpcodesniffer-standard".
There are also a lot of packages that adhere to this type.
Adding the following line to the composer.json will make it possible for such packages to install this external PHPCS standard using Composer:
    "type" : "phpcodesniffer-standard"This will in no way change the existing behaviour of this package for users that do not include one of the packages mentioned above in their projects composer.json.