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

Technical Evaluation

Architecture fit: Excellent alignment with Laravel's standard PHPUnit-based testing setup. Uses common coverage formats (clover.xml) that Laravel projects already generate, with minimal dependencies (nikic/php-parser). Integrates seamlessly with Laravel's test workflow without requiring framework-specific modifications.
Integration feasibility: High. Requires only composer require --dev and adding a single CI command after PHPUnit execution. The init command generates a starter config, enabling zero-configuration first use. Path mapping and patch handling are straightforward for CI environments.
Technical risk: Low. MIT license and active maintenance (1.0.0+ releases). However, future-dated release (2026-01-02) suggests potential data error, and 0 dependents indicate limited real-world adoption. Key risks: path mismatches between local/CI environments (if addCoveragePathMapping not configured), and potential false negatives if minExecutableLines is set too high for Laravel's dynamic methods.
Key questions: How does it handle Laravel's dynamic method calls (e.g., __call in Facades)? Does it support Laravel's test helpers (e.g., actingAs()) in coverage analysis? What's the performance impact on CI pipelines for large codebases?

Integration Approach

Stack fit: Ideal for Laravel 9+ (PHP 8.1+ requirement). Fully compatible with Laravel's default PHPUnit setup, including phpunit.xml coverage configuration. Works with PCOV/XDebug and integrates with PhpStorm/GitLab visualization tools.
Migration path: Start with coverage-guard init → customize rules for new code only (--patch mode) → gradually expand coverage rules to legacy code. For existing projects, use path mapping to align CI/local paths. Phase 1: enforce coverage only on new/modified files. Phase 2: add rules for critical components (e.g., Controllers, Repositories).
Compatibility: Requires PHP 8.1+. Works with all PHPUnit versions and Laravel 8+ (if PHP upgraded). Supports all PHPUnit coverage formats but strongly recommends clover.xml for IDE/GitLab compatibility.
Sequencing: 1) Install package and generate config. 2) Update CI to generate clover.xml after tests. 3) Add coverage-guard check --patch to CI pipeline for new code enforcement. 4) For parallel jobs, use merge

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.
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium