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

Soda Laravel Package

cosmira/soda

cosmira/soda is a lightweight Laravel/PHP package for simple object data access, offering an expressive API to query and manage records. It integrates cleanly with Laravel, reduces boilerplate, and keeps database interactions clear and minimal. Easy to learn and extend.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Add the package as a dev dependency and commit its config. v1.1.1 keeps rule IDs and existing explicit configurations compatible and adds no new options or dependencies.
  • Look first at the rule catalog/config for the standard gate and the rules called out in the release: prefer_continue, redundant else/elseif, logical grouping, and max_return_statements. Use the updated executable documentation examples as your first regression fixtures.
  • Run the standard gate on a small Laravel slice first—one controller/service/job or changed files only—before enabling it repo-wide. The standard gate is now 108 checks and no longer includes max_return_statements.
  • First use case: enable the standard gate in CI for new/changed code, then explicitly opt in max_return_statements only if your team enforces a return-count policy. Expect fewer findings around fluent predicates, nested argument calls, natural while conditions, prefer_continue, and redundant else/elseif than in the previous release.

Implementation Patterns

  • Treat config as code. Keep the standard gate as the base and add explicit opt-ins such as max_return_statements with a team-agreed threshold. Existing explicit rule selections will continue to work.
  • Use changed-files/diff mode in pre-commit hooks and the full standard gate in CI. Expand to legacy code gradually rather than doing a big-bang cleanup.
  • For prefer_continue, enable it for nested executable control flow inside loops. Accept flat positive branches, callback scopes, complete exits, and finalizers as separate cases; do not force continue everywhere.
  • For redundant else/elseif, only simplify after a proven unconditional exit. Preserve meaningful mutually exclusive operations and earlier non-exiting branches.
  • For logical grouping, common fluent predicates, nested argument calls, and natural while conditions are accepted. Add parentheses when mixing logical families such as && and || without explicit grouping. Use explicit grouping in complex Laravel query-builder/collection predicates.
  • Preserve return variables that carry a relevant local type assertion. Avoid moving observable bindings, assignments, or returns out of try/finally blocks during cleanup.
  • Apply the package to Laravel controllers, form requests, jobs, policies, and service classes. The parser changes should reduce false positives around fluent query-builder chains and nested calls.

Gotchas and Tips

  • The upgrade is non-breaking by declared compatibility, but behavior narrows. CI may become quieter even with the same config; do not assume every previous finding was fixed.
  • max_return_statements was removed from the standard gate. If you relied on the gate to enforce it, add the rule explicitly. It reports a literal return count, so avoid treating it as a general complexity metric.
  • prefer_continue is intentionally narrower. Do not add suppressions for flat positive branches, callbacks, complete exits, or finalizers unless you have a separate team convention outside this rule.
  • Redundant else/elseif findings now require proven unconditional exits. Review mutating branches and mutually exclusive operations manually before simplifying.
  • Mixed logical families without explicit grouping may still require parentheses. Do not rely on natural reading for precedence between && and ||.
  • Review documentation/auto-fix rewrites for truthiness, preceding work, side effects, and loop reevaluation. Naive simplifications can change behavior even when the analyzer is correct.
  • Debug by isolating one rule ID, running on one file or changed files, and checking stale suppressions/baselines. Since rule IDs remain compatible, old suppressions may simply no longer match findings after the narrowing release.
  • No new dependencies or options were added; existing extension points and config semantics remain the safe integration surface.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo