cartalyst/php-cs-fixer-config
Reusable PHP-CS-Fixer configuration from Cartalyst. Provides a shared rule set and presets to standardize coding style across projects, making formatting consistent and easy to apply in CI and local development.
Install the package via Composer (composer require --dev cartalyst/php-cs-fixer-config), then create or update .php-cs-fixer.php in your project root:
<?php
require __DIR__ . '/vendor/autoload.php';
return Cartalyst\PhpCsFixer\Config::create();
Run ./vendor/bin/php-cs-fixer fix --dry-run to preview changes. This immediately enforces Cartalyst’s internal standards—ideal for new or legacy Cartalyst ecosystem projects.
.php-cs-fixer.php files that call Cartalyst\PhpCsFixer\Config::create() and selectively override rules (e.g., ->setRule('visibility_required', false) for test suites).vendor/bin/php-cs-fixer fix . --config=.php-cs-fixer.php --using-cache=no and fail on non-compliant code.husky (via Node) or overcommit (Ruby) to auto-fix staged files before commit.'yoda_style' => false or 'phpdoc_var_without_name' => false to align with Laravel conventions.friendsofphp/php-cs-fixer is installed and pinned to a version this config supports (e.g., v3.x).--diff first to audit changes before committing.^1.0 or loose version constraints—pin to a SHA or exact version if the package is available, to prevent silent rule changes.App\PhpCsFixer\Config extends Cartalyst\PhpCsFixer\Config) instead of editing vendor files.--verbose and check PHP version compatibility (e.g., union types require PHP 8.0+, but older fixer versions may mishandle them).How can I help you explore Laravel packages today?