- How do I install tenantcloud/php-cs-fixer-rule-sets in a Laravel project?
- Install it as a dev dependency with composer require --dev tenantcloud/php-cs-fixer-rule-sets, alongside php-cs-fixer itself, and commit the updated composer.json and lock file. Because it is development-time tooling, nothing needs to be registered in a service provider and no runtime configuration changes. After installation, point your project's fixer config at the rule set the package exposes and run a dry run before applying anything.
- Does tenantcloud/php-cs-fixer-rule-sets work with Laravel Pint?
- Pint is a first-party wrapper around php-cs-fixer, so the two overlap and you should decide deliberately whether this rule set replaces Pint's preset or layers on top of it. The package does not document Pint interop, so test it in a scratch branch before committing. Running two style authorities in the same pipeline is the failure mode to avoid.
- Which PHP and php-cs-fixer versions does this rule set support?
- Check the constraints declared in the package's composer.json before assuming compatibility, since a rule set is only as good as its php-cs-fixer compatibility matrix. php-cs-fixer renames, deprecates, and removes rules across major versions, so pin the fixer and this package together and upgrade them as a pair. If the constraints are loose or absent, verify behaviour at runtime with a dry run against a real repository.
- Is tenantcloud/php-cs-fixer-rule-sets safe to add to a production Laravel app?
- It has no runtime footprint: it is a Composer require-dev dependency consumed only by the fixer, so it never ships in the deployed application. The real exposure is supply chain risk in CI, which you mitigate by pinning versions, reviewing the lock file diff, and keeping the dependency out of production installs. Container builds, deployment, and rollback are unaffected.
- How do I configure the rule set in .php-cs-fixer.php?
- The typical pattern is to require the package's autoloader in your fixer config, reference the rule set or factory it exports, and then define your finder paths. The exact class name or array key depends on whether the package exposes declarative config or registers custom fixers, so inspect the source after installing. Keep that config file in version control so every repository points at the same versioned definition.
- How do I add this code style check to GitHub Actions or GitLab CI?
- Add a CI job that installs dev dependencies with composer install and then runs php-cs-fixer fix --dry-run --diff against your project config. Cache the Composer directory to keep the job fast, and start the check as non-blocking before flipping it to required. Pin both php-cs-fixer and the rule set so CI results stay reproducible.
- Will adopting this rule set cause a huge reformat diff across my repository?
- Possibly, which is why you should run a full-repo dry run with --dry-run --diff and count the affected files before merging anything. If the churn is a handful of files, land it as a single chore commit with no functional changes. If it is hundreds of files, either gate the check to changed files in CI or defer adoption rather than bundling a mass reformat with feature work.
- Does tenantcloud/php-cs-fixer-rule-sets ship custom fixer classes or just a config array?
- This is the key question to answer during evaluation: the package may export a plain declarative config array, or it may register custom fixer classes that execute in CI with repository access. Declarative config keeps the review burden low, while executable fixers warrant a proper supply chain review. Inspect the package source and composer.json before rolling it out.
- What is the maintenance and backward compatibility policy for this rule set?
- The package appears to be TenantCloud's internal style config published outward, with no public dependents or issue traffic to signal its upgrade cadence. That means backward compatibility across rule set revisions is not guaranteed by community pressure, so treat version bumps as reviewable changes. Pin the exact version in composer.json and read the diff on each upgrade.
- Is tenantcloud/php-cs-fixer-rule-sets better than copy-pasting .php-cs-fixer.php between repos?
- That is its main value: it turns a style contract into a versioned dependency so multiple repositories converge on one definition instead of drifting copies. The trade-off is coupling to a single vendor's preferences and release cadence, plus deciding how it coexists with Pint. For teams running several Laravel services, that centralisation usually outweighs the cost.