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

Coke Laravel Package

m6web/coke

Coke is a CLI wrapper around PHP_CodeSniffer that lets you manage per-project rules via a .coke file. Run phpcs with easy include/exclude lists, optional “only git changed” mode, verbose output, and pass through any phpcs arguments.

View on GitHub
Deep Wiki
Context7

:no_entry: DEPRECATED - PHP Code Sniffer configurator

Frequently asked questions about Coke
Is **m6web/coke** compatible with Laravel 10+ or PHP 8.1+?
No, **m6web/coke** is outdated and only supports PHP ≤7.1, making it incompatible with Laravel 10+ (which requires PHP 8.1+). It lacks modern autoloading (PSR-4) and conflicts with Laravel’s dependency ecosystem. Use **php-cs-fixer** or **Laravel Pint** instead.
How do I migrate from **m6web/coke** to a modern Laravel-compatible tool?
Replace **m6web/coke** with **php-cs-fixer** (active maintenance) or **Laravel Pint** (built for Laravel). Extract custom rules from your `.coke` file and redefine them in a `php-cs-fixer.config.php` or `pint.json`. Run `composer require friendsofphp/php-cs-fixer` to start.
Can I use **m6web/coke** in a Laravel project for legacy code enforcement?
Technically possible but risky. Isolate it in a Docker container with PHP 7.1 or run it as a one-off CI step (e.g., GitHub Actions). However, modern Laravel projects should prioritize **php-cs-fixer** or **PestPHP** for static analysis to avoid technical debt.
Does **m6web/coke** support Git pre-commit hooks in Laravel?
Yes, but it’s not recommended for Laravel 10+. If you must use it, configure a Git hook via `./vendor/bin/coke` (or `./bin/coke` if customized). For modern workflows, use **Laravel Pint** with `pint --test` or **PestPHP** for pre-commit checks.
What are the security risks of using **m6web/coke** in production?
**m6web/coke** hasn’t been updated since 2017 and may include unpatched vulnerabilities in its dependencies (e.g., old PHPUnit). It also lacks Laravel’s security best practices like dependency injection. Replace it with **php-cs-fixer** or **Laravel Pint** for secure, maintained alternatives.
How do I configure **m6web/coke** to work with Laravel’s `vendor/bin`?
Add it to `require-dev` in `composer.json` and run `composer install`. The binary will symlink to `vendor/bin/coke`. However, this conflicts with Laravel’s modern toolchain. For Laravel 10+, use `composer require laravel/pint` and configure `pint.json` instead.
Are there Laravel-specific alternatives to **m6web/coke**?
Yes. Use **Laravel Pint** (official Laravel formatter) for code style or **php-cs-fixer** with Laravel presets. For testing, integrate **PestPHP** or **PHPStan** via `phpstan.neon`. These tools are actively maintained and Laravel-optimized.
Can I use **m6web/coke** with custom PHP_CodeSniffer standards?
Yes, but it’s not future-proof. Define your `standard-path` and `standard` in `.coke`. For Laravel, port these rules to **php-cs-fixer** (e.g., `@PSR12`, custom rules in `php-cs-fixer.config.php`) to avoid obsolescence.
Will **m6web/coke** break my Laravel CI/CD pipeline?
Likely yes. It requires PHP ≤7.1 and conflicts with Laravel’s modern dependencies. Replace it with **php-cs-fixer** or **Laravel Pint** in your CI (e.g., GitHub Actions). Example: `php-cs-fixer fix --dry-run --diff`.
How do I check if my Laravel project depends on **m6web/coke**?
Run `composer why m6web/coke` to identify dependencies. If it’s a transitive dependency, use `composer require --ignore-platform-reqs` cautiously or replace it. For direct dependencies, audit your `composer.json` and migrate to **php-cs-fixer**.
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
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