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

Pest Plugin Blade Coverage Laravel Package

capell-app/pest-plugin-blade-coverage

A Pest plugin that adds Blade template coverage to Laravel test suites, helping you identify which view files are exercised by tests and where untested Blade code remains.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Package classification: Developer-tooling / test-instrumentation package. It extends Blade rendering with coverage capture and publishes results through the existing test runner. It is a dev-only dependency and does not belong on a production autoload path.

Architecture fit: Good, with caveats. The package is a thin plugin over Laravel's view compiler and the PHPUnit/Pest coverage pipeline rather than a framework fork, so it should slot in without touching application code. The v0.1.3 change is configuration-surface work, not architectural: it formalises resources/views as the default root and adds an explicit opt-in for monorepo layouts. That is the correct default for standard Laravel skeletons and confirms the package expects a conventional app structure.

Integration feasibility: Straightforward for a single-app repo — composer require --dev, config publish, run the suite with a coverage driver (Xdebug or PCOV) enabled. Two friction points remain unproven: (1) whether the coverage driver requirement conflicts with the existing CI job's driver choice, and (2) whether the plugin instruments compiled Blade output and maps it back to .blade.php source, which is the technically hard part and the thing that determines whether the numbers are trustworthy.

Technical risk: Elevated, but bounded to CI rather than runtime.

  • Pre-1.0 API instability. At v0.1.3 the config keys, output format, and plugin registration are all subject to change without a deprecation cycle. The monorepo opt-in flag added here is exactly the kind of key that may be renamed or restructured before 1.0.
  • Framework-matrix coupling. A Blade-coverage plugin is tightly bound to Laravel's view compiler internals and the PHPUnit coverage API, both of which move between minor versions. Support for Laravel 11/12, PHP 8.2+, PHPUnit 10/11, and Pest is unconfirmed.
  • Monorepo path resolution. Opt-in support implies the default resources/views assumption is wrong for monorepos. Misconfigured roots are the most likely source of silent zero-coverage results rather than loud errors.
  • Coverage semantics. "Blade coverage" is ambiguous: line coverage of compiled PHP, or branch/line coverage attributed back to template source? This materially changes how the team should interpret a percentage.
  • Evidence quality. This assessment rests on a one-line release note. No changelog, no version support matrix, no maintainer or download signal, and no prior assessment to diff against. Treat the confidence level as low.

Key questions:

  1. Which Laravel, PHP, PHPUnit, Pest, and coverage-driver versions are supported, and is there a CI matrix proving it?
  2. Does coverage map to .blade.php source lines, and how are @include, @component, and anonymous-component partials attributed — to the parent or the partial?
  3. What is the CI wall-clock and memory overhead on a suite of realistic size (say 500+ views)?
  4. For monorepos, is the opt-in a single root path, a list of paths, or a glob? Does it handle multiple packages each with their own resources/views?
  5. What happens when no coverage driver is present — hard failure or silent zero?
  6. Who maintains the package, what is the release cadence, and is there any stated 1.0 timeline or backwards-compatibility commitment?

Integration Approach

Stack fit: Good for a standard Laravel monolith or a modular Laravel app with conventional view roots. The default resources/views behaviour means near-zero configuration for the common case, which lowers the cost of a trial. The monorepo opt-in makes the package usable in a workspace layout without forking, but it shifts configuration burden onto the adopting team — each package's view root must be declared and kept in sync as the workspace evolves.

Migration path: Greenfield, additive, and reversible. Nothing to migrate. Adopt as a dev dependency, keep it out of the production image, and gate the whole thing behind a CI job that can be deleted in one commit. There is no data migration, no runtime surface, and no consumer-facing change, so the blast radius of a bad experience is a red CI job and an afternoon lost.

Compatibility: The open risk. Verify against the actual project matrix before committing: Laravel major version, PHP minor, PHPUnit/Pest version, and whether CI runs Xdebug, PCOV, or neither. PCOV is materially faster and is the pragmatic choice if the plugin supports it. Also confirm the package does not conflict with an existing coverage configuration in phpunit.xml — two tools competing for the same coverage filter is a common and confusing failure.

Sequencing:

  1. Spike (1–2 days). Install in a throwaway branch on the largest existing app. Run the suite with coverage on. Answer the semantics question (compiled vs. source attribution) and record wall-clock and memory deltas against the current baseline.
  2. Report-only CI job. If the spike is clean, add a non-blocking job that publishes the Blade coverage report as a build artefact. No threshold, no gate. Let it run for two to three weeks to establish a stable baseline and to surface false negatives.
  3. Monorepo configuration. Only if the spike repo is a monorepo, declare view roots explicitly and confirm every package is picked up. Watch for packages added later that are silently excluded.
  4. Threshold gate. Once the baseline is stable and the team trusts the numbers, add a modest non-regression gate (e.g. no drop >2pp on changed files) rather than an absolute floor. Absolute floors on a newly instrumented, pre-1.0 tool invite gaming and frustration.
  5. Re-evaluate at 1.0. Pin the minor version until then and re-run this assessment when the package declares stability.

Operational Impact

Maintenance: Low ongoing effort, but non-zero version-chasing. Being pre-1.0, pin the exact version and treat upgrades as reviewed changes requiring a CI run, not routine composer update churn. Budget a small recurring cost each Laravel or PHPUnit major bump — the view compiler and coverage APIs are the two things most likely to break this package. Single-maintainer or small-team risk is the principal sustainability concern; if the package stalls, the fallback is to remove the dev dependency, which is cheap.

Support: Community-only, expected for a v0.1.x tooling package. There is no vendor SLA and no realistic path to one. Internal ownership should sit with whoever owns the test suite and CI, not with application teams. Document the config keys in the repo's own README so knowledge does not live with one engineer.

Scaling: The main cost is CI compute, not runtime — the package has no production footprint, which is its best operational property. Coverage instrumentation typically multiplies suite time; on a large view count, expect a meaningful increase and plan to run this in a dedicated job rather than bolted onto the primary test run. Memory is the more likely ceiling: instrumenting hundreds of compiled views can be heavy, so watch for OOM on large suites and consider sharding. In a monorepo the cost scales with the number of declared view roots, so the opt-in list is also a cost driver.

Failure modes to watch:

  • Silent zero coverage — wrong view root, missing coverage driver, or a monorepo package not opted in. The report succeeds and shows nothing; nobody notices. Mitigate with a sanity assertion that the report is non-empty for a known-covered view.
  • False negatives on dynamic views — views resolved at runtime, @include with variable names, or views registered from non-standard paths may be invisible to the collector, producing misleading gaps.
  • Coverage-filter collision — the plugin and existing phpunit.xml coverage config fighting over the same source set.
  • Pre-1.0 breakage on upgrade — a minor bump changing config keys or output format, breaking the CI job silently if it is report-only.
  • Overhead creep — suite time drifting upward as the view count grows, with the gate becoming the slowest part of CI.

Ramp-up: Low for setup, moderate for interpretation. Any Laravel developer can install and run it in under an hour. The harder skill is reading Blade coverage honestly: understanding that a 100% figure on a layout template is not the same signal as 100% on a form partial, and that partials attributed to parents can inflate or deflate the picture. Plan a short walkthrough with the team on what the number does and does not mean before it becomes a gate. Budget roughly one engineer-day for the spike plus a half-day of documentation; everything after that is CI configuration.

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast