Skip to content

Composer plugin is not always triggered

Cases

First case

If you require the composer plugin, & codesniffer standards in the same composer.json (via require) the composer plugin is not always triggered (reported by @DanielSiepmann)

{
    "require-dev": {
        "higidi/composer-phpcodesniffer-standards-plugin": "~0.4.1",
        "typo3-ci/typo3sniffpool": "~2.1.1",
        "typo3-ci/typo3cms": "~6.2.4"
    }
}

Second case

If you already have installed codesniffer standards and the squizlabs/php_codesniffer gets updated composer update, the installed codesniffer standards gets not synced/installed back into the new codesniffer version.

Third case

As described in #23 (closed) removed codesniffer standards over distributed vendor package versions gets not uninstalled from php codesniffer on venor package update.

How to fix the issue

  • The plugin should be triggered for all phpcodesniffer-standard package types on (install, update, remove)
  • The plugin should be triggered on update of the squizlabs/php_codesniffer package to reinstall all local installed codesniffers standards
  • Write functional test cover the cases
Edited by Daniel Hürtgen