webproject-xyz/php-cs-fixer-config

The WebProject php-cs-fixer-config

Maintainers

Package info

github.com/WebProject-xyz/php-cs-fixer-config

Homepage

pkg:composer/webproject-xyz/php-cs-fixer-config

Transparency log

Statistics

Installs: 31

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 1

1.0.0 2026-07-17 20:59 UTC

This package is auto-updated.

Last update: 2026-07-17 21:03:08 UTC


README

CI Latest Stable Version PHP Version License Codeception

Common PHP CS Fixer configuration for WebProject projects.

Provides a standardized, robust, and modern PHP CS Fixer configuration.

๐Ÿš€ Key Features

  • Preconfigured Rules: Includes standard rule sets like @PSR12, @Symfony, @Symfony:risky, @PhpCsFixer:risky, and @PHP8x3Migration.
  • Parallel Execution: Automatically detects and utilizes multiple CPU cores for faster analysis.
  • Risky Rules Enabled: Risky refactorings are allowed by default.

๐Ÿ“ฆ Installation

Install the package via Composer:

composer require --dev webproject-xyz/php-cs-fixer-config

Prerequisites

  • PHP: ~8.5.0

๐Ÿ› ๏ธ Usage

Create a .php-cs-fixer.php file in the root of your project:

<?php

declare(strict_types=1);

return new \WebProject\PhpCsFixerConfig\PhpCsFixerConfigFactory()(__DIR__);

Customizing Directories and Exclusions

You can pass specific directories to check, as well as directories to exclude:

<?php

declare(strict_types=1);

return new \WebProject\PhpCsFixerConfig\PhpCsFixerConfigFactory()(
    dirs: [
        __DIR__ . '/src',
        __DIR__ . '/tests',
    ],
    excludeDirs: [
        __DIR__ . '/tests/_output',
    ]
);

๐Ÿงช Development & Testing

We maintain high standards for this module:

  • Static Analysis: PHPStan Level 8.
  • Coding Style: Strict PSR-12/Symfony standards.
  • Automation: GrumPHP hooks ensure all commits are verified.

Commands

composer qa        # Run all Quality Assurance checks (build tests, fix CS, run tests, run phpstan)
composer stan      # Run static analysis
composer test      # Run unit tests
composer cs:check  # Check coding standards
composer cs:fix    # Fix coding standards automatically

๐Ÿค Contributing

Contributions are welcome! Please see our CONTRIBUTING.md for details.

  1. Fork the Project.
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature).
  3. Commit your Changes (git commit -m 'feat: Add some AmazingFeature').
  4. Push to the Branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

๐Ÿ“œ License

Distributed under the MIT License. See LICENSE for more information.

โœ‰๏ธ Support & Contact