Download the PHP package cosmira/soda without Composer
On this page you can find all versions of the php package cosmira/soda. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package soda
Short Description Keep your PHP code clean and maintainable by enforcing quality rules based on metrics
License MIT
Homepage https://github.com/cosmira/soda
Informations about the package soda
Soda
Soda checks how your PHP code is organized. It reports oversized methods, nested workflows, repeated decisions, and naming problems with source locations and refactoring advice. Use it alongside your formatter and PHPStan or Psalm.
Get started
Requires PHP 8.2 or later and Composer.
Replace src/ with your source directory. Without a soda.php configuration,
Soda runs its standard rules. Vendor directories are excluded automatically.
A passing check exits with 0; quality violations or input and configuration
errors exit with 1.
Understand a finding
A shipping workflow can be valid PHP and still make the reader follow four nested decisions:
Soda's nesting rule reports this method at its standard limit:
A guard keeps the same order of checks and shipping behavior with less nesting:
A finding identifies a violation of a selected policy, not necessarily a behavior bug. Review your first findings before deciding how to change your code or rule selection.
Make it part of your project
Choose a configuration: keep the standard bundle in a
short soda.php, or generate editable rule objects with vendor/bin/soda init.
Then use vendor/bin/soda for the same check locally and in CI.
- Installation covers your first check and its results.
- Configuration covers paths, exclusions, and rules.
- Continuous integration covers exit status and JSON reports.
- Documentation has the guides and rule reference.
Contribute
Clone the repository and run composer install. Use php soda in place of
vendor/bin/soda inside this repository. Run composer test for behavioral tests
and composer ci for all project checks.
See Adding a quality rule to contribute a check. For documentation changes, follow the writing template and run its Vale checks.
Soda is available under the MIT license.
All versions of soda with dependencies
illuminate/console Version ^11.0||^12.0||^13.0
illuminate/container Version ^11.0||^12.0||^13.0
illuminate/events Version ^11.0||^12.0||^13.0
illuminate/support Version ^11.0||^12.0||^13.0
laravel/prompts Version ^0.1.15||^0.2.0||^0.3.0
nikic/php-parser Version ^5.0
phplrt/parser Version ^4.2.4
phplrt/source Version ^4.2.4
phpunit/php-file-iterator Version ^5.1||^6.0||^7.0
sebastian/complexity Version ^4.0||^5.0||^6.0