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

lookyman/coding-standard

Opinionated PHP coding standard package for your projects. Install via Composer and reference the bundled ruleset.xml in PHP_CodeSniffer to enforce consistent formatting and style, with room to add your own project-specific rules.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Coding Standard
Is this package compatible with Laravel 10 and PHP 8.1+?
No, this package was last updated in 2018 and lacks PHP 8.x support. It may fail due to deprecated syntax like dynamic properties or union types. Test thoroughly before use, or fork it to update dependencies.
How do I integrate this into Laravel’s CI pipeline?
Add it as a GitHub Actions or GitLab CI step using `vendor/bin/phpcs --standard=lookyman`. Example: `run: vendor/bin/phpcs --standard=lookyman --runtime-set installed_paths ./vendor/lookyman/coding-standard`.
Does this package support Laravel-specific rules (e.g., Blade templates, Facades)?
No, it enforces generic PHP standards (PSR-1/PSR-2) and lacks Laravel-specific rules. For Blade or Facade checks, use alternatives like `php-cs-fixer` with custom rules or `laravel-shift/blade-style-guide`.
Can I migrate existing rules to php-cs-fixer?
Yes, compare outputs with `php-cs-fixer --dry-run` to identify gaps. Recreate rules in `.php-cs-fixer.dist.php` using the `--ruleset-file` option. This is the recommended long-term approach.
Will this break if I use modern PHP features like arrow functions?
Likely yes. The package enforces outdated standards (e.g., PSR-1/PSR-2) and may flag modern Laravel patterns like arrow functions (`fn()`) or named arguments as violations.
How do I configure custom exceptions for legacy code?
Extend the `ruleset.xml` to ignore specific files/directories. Example: `<exclude-pattern>*/legacy/*</exclude-pattern>`. Document exceptions in your team’s coding guidelines.
Are there alternatives for Laravel-specific coding standards?
Yes. Use `php-cs-fixer` (PSR-12) or `pint` for modern PHP, and `laravel-shift/blade-style-guide` for Blade templates. For Facade/Service Container rules, create custom `php-cs-fixer` rules.
Can I run this as a pre-commit hook in Laravel?
Yes, but it’s not recommended due to the package’s outdated state. Instead, use `husky` with `php-cs-fixer` or `pint` for pre-commit checks. This package is better suited for CI/CD.
What’s the deprecation risk of using this package?
High. The package is unmaintained, lacks PHP 8.x support, and conflicts with modern tooling. Plan to migrate to `php-cs-fixer` or `pint` within 6–12 months to avoid technical debt.
How do I fork and update this for Laravel 10?
Fork the repo, update `composer.json` to require PHP_CodeSniffer v3+, and modify `ruleset.xml` to align with PSR-12. Publish as `vendor/yourname/laravel-coding-standard` to avoid vendor lock-in.
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.
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views