Search by

tomaraoo / yii2-pint

zenjaku

A fast parallel code-style formatter for Yii2 projects across PHP 5.6 and modern PHP versions.

Package info

github.com/tomaraoo/yii2-pint

pkg:composer/tomaraoo/yii2-pint

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1 2026-09-21 05:22 UTC

This package is auto-updated.

Last update: 2026-09-21 05:24:38 UTC


README

tomaraoo/yii2-pint is a parallel code-style checker and formatter for Yii2 projects. Its command-line code is compatible with PHP 5.6 and modern PHP releases.

Installation

composer require --dev tomaraoo/yii2-pint

PHP_CodeSniffer 3.x supports PHP 5.4 and newer. This package requires PHP 5.6 or newer and uses PHPCS/PHPCBF as its formatting engine.

Usage

Format the current project:

vendor/bin/yii2-pint --parallel

Check formatting without changing files:

vendor/bin/yii2-pint check --parallel

Choose the number of workers:

vendor/bin/yii2-pint fix --parallel=8 common backend frontend

Process only Git changes:

vendor/bin/yii2-pint --dirty
vendor/bin/yii2-pint check --staged

Configuration

Copy yii2-pint.example.json to yii2-pint.json in the consuming project:

{
    "paths": ["common", "backend", "frontend", "console"],
    "exclude": ["vendor/*", "runtime/*", "*/web/assets/*"],
    "extensions": ["php"]
}

Set standard to a project-relative PHPCS ruleset when additional rules are needed:

{
    "standard": "phpcs.xml",
    "paths": ["common", "backend"]
}

Commands and exit codes

  • fix is the default command. It returns 0 when files are clean or all fixable violations were corrected.
  • check never changes files and returns a non-zero status when violations exist.
  • Invalid configuration and unavailable tooling return 2.

Runtime support

The package source intentionally avoids PHP 7+ language features. CI should test PHP 5.6 and currently supported modern PHP versions before each release.