A Composer plugin that automatically installs and configures PHP_CodeSniffer coding standards.
PHPCSStandards/composer-installer is a Composer installer plugin that automates the installation and management of PHP_CodeSniffer coding standards (rulesets). It solves the problem of manual setup by automatically detecting and registering standards from Composer packages, eliminating the need for symbolic linking, directory checking, or configuration changes.
PHP developers and teams using PHP_CodeSniffer for code quality and coding standards enforcement, particularly those managing multiple coding standards as Composer dependencies.
Developers choose this plugin because it streamlines the PHP_CodeSniffer ecosystem by making coding standard installation as seamless as any other Composer dependency, reducing setup complexity and support overhead. Its automatic configuration of PHP_CodeSniffer's `installed_paths` eliminates manual steps.
Composer installer for PHP_CodeSniffer coding standards
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Searches for `phpcodesniffer-standard` packages in Composer dependencies and configures PHP_CodeSniffer's `installed_paths` automatically, eliminating manual symbolic linking and configuration changes.
Allows coding standards to require this plugin, ensuring all dependent standards are installed for end-users, which reduces support overhead as emphasized in the README.
Supports PHP from 5.4+ to 8.x, Composer 2.2+, and PHP_CodeSniffer 3.x and 4.x, making it versatile for legacy and modern projects alike.
Can be invoked directly via Composer scripts, enabling seamless integration into development and continuous integration environments, as shown in the example configurations.
When installed globally, Composer loads the global plugin over the local one, leading to potential version mismatches and confusion, a caveat explicitly mentioned in the README.
Requires explicit permission in Composer 2.2+ via `allow-plugins` configuration, adding an extra step that can be overlooked or blocked in restricted setups.
The default search depth of three directories might not suffice for complex project structures, requiring manual adjustment through the `phpcodesniffer-search-depth` configuration.