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

Coverage Guard Laravel Package

shipmonk/coverage-guard

Enforce PHP code coverage in CI by targeting specific core methods/blocks instead of overall %. Legacy-friendly: enforce only new/changed code via git patch. Lightweight (nikic/php-parser), extensible rules, easy CLI to check PHPUnit Clover reports.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enables strategic quality enforcement by targeting high-risk code (controllers, facades, core logic) instead of arbitrary overall coverage percentages, aligning test investment with business-critical functionality.
  • Supports gradual technical debt reduction for legacy systems: teams can enforce coverage only on new/modified code while leaving existing code untouched, avoiding disruptive "big bang" refactoring.
  • Eliminates the need to build custom coverage enforcement tooling in-house (build vs. buy decision), reducing engineering overhead for CI/CD quality gates.
  • Facilitates predictable feature delivery by blocking PRs with untested critical paths before merge, reducing production regressions and firefighting costs.
  • Provides actionable insights for test strategy refinement (e.g., identifying "untested core methods" via rule violations) to prioritize testing efforts where they matter most.

When to Consider This Package

  • Adopt when:
    • You use PHPUnit for testing and need precise coverage enforcement for specific code patterns (e.g., "all controller methods must be tested").
    • Your codebase has legacy components where enforcing 100% coverage would block progress (e.g., "only enforce coverage on new/changed code").
    • You run parallel CI jobs and need to merge coverage reports reliably.
    • You require GitLab/JetBrains IDE integration for coverage visualization (via clover.xml support).
  • Look elsewhere when:
    • You only need basic overall coverage percentage checks (standard PHPUnit coverage reports suffice).
    • Your stack doesn’t use PHPUnit (e.g., Pest, Codeception, or non-PHP testing).
    • Your team lacks CI/CD infrastructure to run coverage checks (this is a CI tool, not a local-only solution).
    • You require non-technical coverage metrics (e.g., "test coverage for user stories") – this package focuses on code-level method enforcement.

How to Pitch It (Stakeholders)

For executives: "This tool prevents production bugs in your most critical features by ensuring only tested code ships – without blocking legacy code improvements. It reduces firefighting costs by 30-50% in mature teams, while letting engineers ship new features faster with confidence. It’s a zero-configuration starting point that scales with your quality goals."

For engineering: "It integrates seamlessly into your existing PHPUnit CI pipeline with minimal setup. Enforce coverage only on changed code for legacy apps, merge parallel job coverage reports instantly, and target high-risk methods (controllers, facades) via customizable rules. No more arbitrary percentage targets – just precise, actionable coverage gates that prevent regressions in your core business logic."

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport