Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Coding Standard

Coding Standard Laravel Package

sylius-labs/coding-standard

Battle-tested Sylius coding standard for PHP. Install via Composer and import the provided ecs.php into your EasyCodingStandard (ECS) config to apply consistent formatting and rules across your project. Includes guidance for migrating from YAML to PHP configs.

View on GitHub
Deep Wiki
Context7

:1st_place_medal: Battle-tested coding standard configuration used in Sylius.

Frequently asked questions about Coding Standard
How do I install this coding standard for my Laravel project?
Run `composer require --dev sylius-labs/coding-standard` and import the config in your `ecs.php` using `$ecsConfig->import(__DIR__ . '/vendor/sylius-labs/coding-standard/ecs.php');`. Ensure you also have `symplify/easy-coding-standard` installed as a dev dependency.
Will this work with Laravel 10+ and PHP 8.2?
Yes, this package enforces PSR-12 and Sylius conventions compatible with Laravel 10+ and PHP 8.2. However, test thoroughly in your CI pipeline, as some Sylius-specific rules may conflict with Laravel’s naming conventions (e.g., Facades or Service Providers).
What’s the ECS v13.1.3+ conflict mentioned in the TPM assessment, and how do I fix it?
ECS v13.1.3+ introduces a rule conflict with this package. To resolve it, either pin ECS to `<13.1.3` in `composer.json` or override the conflicting rule in your `ecs.php` by calling `$ecsConfig->skip([ConflictRuleClass])` (check PR #64 for the exact class name).
Can I use this alongside my existing ECS config without duplication?
Yes, simply import the Sylius config into your existing `ecs.php` using `$ecsConfig->import()`. However, if you’re using ECS v13.1.3+, you’ll need to handle the conflict explicitly to avoid rule duplication or failures.
Does this package enforce Laravel-specific rules, or is it purely Sylius-focused?
It primarily enforces Sylius conventions (e.g., naming, interfaces) while aligning with PSR-12. Laravel-specific patterns like Facades or Service Providers may require exceptions. Review the rules and adjust your `ecs.php` to accommodate Laravel’s conventions.
How do I migrate from a YAML ECS config to PHP with this package?
Use the `symplify/config-transformer` package to migrate your YAML config to PHP. After migration, import the Sylius config as usual in your `ecs.php`. The transformer handles the conversion while preserving your existing rules.
Will this slow down my CI/CD pipeline significantly?
No, the performance impact is minimal. However, if you encounter conflicts with ECS v13.1.3+, resolving them (via pinning or rule overrides) may require additional CI steps. Test in a staging environment to validate performance.
Are there alternatives to this package for Laravel projects?
Yes, alternatives include Laravel’s built-in `php-cs-fixer` config or packages like `nunomaduro/collision` for Laravel-specific rules. However, this package offers Sylius-proven conventions, which may be ideal for projects requiring consistency with Sylius ecosystems.
How often is this package updated, and who maintains it?
This package is maintained by SyliusLabs and updated alongside Sylius core and ECS changes. Monitor the [GitHub repo](https://github.com/SyliusLabs/CodingStandard) for updates, especially if you rely on Sylius-specific rules. Consider subscribing to release notifications.
Can I customize or override specific rules from this package?
Yes, you can override or skip rules in your `ecs.php` by chaining methods like `$ecsConfig->skip()` or `$ecsConfig->rules()`. For example, to disable a Sylius-specific rule, use `$ecsConfig->skip([SyliusRuleClass::class])`. Document overrides for future maintainers.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin