Weave 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

Codestyle Laravel Package

k10r/codestyle

k10r/codestyle provides a shared PHP code style configuration for K10r projects, making it easy to enforce consistent formatting and linting across Laravel and PHP codebases. It helps teams standardize rules and reduce setup effort.

View on GitHub
Deep Wiki
Context7

Codestyle configuration for our PHP projects.

Frequently asked questions about Codestyle
What is k10r/codestyle and what does it do?
k10r/codestyle is a shared coding-standard package that ships a centralized PHP-CS-Fixer ruleset, so teams don't have to copy the same style configuration into every repository. You install it as a dev dependency and extend the provided ruleset from your own .php-cs-fixer.php file, which keeps formatting consistent across all your PHP and Laravel codebases. It contains only configuration, so it adds no runtime code to your application.
How do I install k10r/codestyle?
Install it with Composer as a development dependency: composer require --dev k10r/codestyle. Because it is purely a linting and formatting tool, it belongs in require-dev and should never be a production dependency. After installing, point your project's .php-cs-fixer.php at the shipped ruleset and run PHP-CS-Fixer as usual.
How do I use the shared ruleset in my own .php-cs-fixer.php?
Create or edit a .php-cs-fixer.php file at the root of your project, have it load the ruleset provided by the package, and optionally layer your own project-specific overrides on top. This keeps the shared baseline in the vendor package while letting each repository adjust only the rules it genuinely needs to differ on. Commit the config file so CI and every developer's IDE use exactly the same rules, and expect a potentially large one-time reformat diff when first applying the ruleset to a mature codebase — land it as a dedicated commit so it doesn't pollute git blame.
Does k10r/codestyle work with Laravel projects?
Yes. It is a plain PHP-CS-Fixer ruleset, so it works in any PHP codebase, including Laravel applications and packages. The rules were written for the K10r PHP/Laravel codebases, so they are tuned for typical Laravel conventions rather than being framework-agnostic. It is not a Laravel package with a service provider, so there is nothing to register in your app.
Does k10r/codestyle conflict with Laravel Pint?
Pint and k10r/codestyle both drive PHP-CS-Fixer-style rule configuration, so running both means two sources of truth for formatting. Pick one as authoritative in CI — if you adopt k10r/codestyle, disable or remove the Pint fixer step so the two don't rewrite the same files. If your team is already standardized on Pint, adopting this package means replacing that tooling rather than augmenting it.
Does k10r/codestyle add runtime overhead or affect production?
No. It is installed with --dev and only provides configuration for a linter, so it never reaches production containers and imposes no runtime overhead. Its blast radius is limited to local IDE workflows and CI lint stages, which means a failure here slows developer velocity rather than customer traffic.
Can I override or customize the rules for a single project?
Yes — the ruleset is designed to be extended, so your project's .php-cs-fixer.php can start from the shared rules and then add, remove, or reconfigure individual fixers. Keep overrides small and justified, otherwise you lose the consistency benefit that motivated using a shared standard in the first place. If an override turns out to be broadly useful, consider contributing it upstream instead of keeping it local.
How do I run k10r/codestyle in CI?
Add a Composer script, such as a cs or lint script, that invokes PHP-CS-Fixer with your project config, and call that script from your CI pipeline. In CI use the dry-run mode so the job fails on violations instead of silently rewriting files. Install with dev dependencies included so both the fixer and the ruleset are available in the job.
Is k10r/codestyle actively maintained?
It is best described as sporadically maintained: the audience is small and it has few dependents, and version 3.1.0 was the first release since November 2022. That release did include a community-contributed pull request and a PHP 8.2 migration config, which shows the repository is not abandoned. Treat the release cadence as a single data point rather than a guarantee, and keep a fork plan in case upstream publishing stops.
Which PHP versions does k10r/codestyle support — does it work on PHP 8.3 or 8.4?
Version 3.1.0 adds a migration config targeting PHP 8.2, making that version an explicitly supported baseline. PHP 8.3 and 8.4 are not documented, so verify resolution against your linter tooling with composer why-not before planning an upgrade. Because per-PHP-version configs are versioned artifacts, each new PHP minor may require a fresh upstream release before your CI can move.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource