Download the PHP package capell-app/pest-plugin-blade-coverage without Composer

On this page you can find all versions of the php package capell-app/pest-plugin-blade-coverage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pest-plugin-blade-coverage

Pest Blade Coverage

Pest plugin for checking that Laravel Blade views are rendered by your test suite.

Normal PHP coverage never reports resources/views/**/*.blade.php, because Blade compiles to PHP elsewhere before it runs. This plugin fills that gap: it records the views Laravel actually renders during your tests, then compares uncovered views against a committed hash baseline so CI only fails for new or changed uncovered Blade files.

It works out of the box on a standard Laravel application (resources/views), and a single include entry extends it to package-per-directory monorepos.

Install

If the package is not available through Packagist yet, add a VCS repository first:

Configure

Configuration is optional. With no tests/blade-coverage.php the plugin scans resources/views/**/*.blade.php, so it works out of the box on a standard Laravel app.

To customise, create tests/blade-coverage.php:

Monorepos

For a package-per-directory monorepo, add the package views to include (the auto grouping then labels failures by package name):

Add a Composer script:

Usage

Run the check:

Create or refresh the baseline:

The baseline update command refuses to write a baseline when target views exist but no views were rendered. This usually means the selected tests did not exercise Blade output. If that is intentional, use the explicit override:

Use a custom config path:

Write a machine-readable report for CI summaries or annotations:

Coverage Rules

Ignoring Individual Views

Add the ignore marker inside a Blade file (typically as a comment) to drop it from coverage entirely, without touching exclude globs:

Co-locating the marker keeps the decision next to the view, so it survives moves and renames that a path-based exclude would not.

Failure Policy

GitHub Actions Integration

When the run detects GitHub Actions (GITHUB_ACTIONS=true) it automatically:

No extra flags are required; it is a no-op outside of GitHub Actions.

Programmatic Use

Capture the views a code path renders from within a single test, independent of the suite-wide run:

Failure Examples

If you add a Blade file but no test renders it:

This fails the Pest process with exit code 1.

If a Blade file was already baseline-uncovered and its contents change without adding render coverage:

This also fails with exit code 1. Fix either case by adding a test that renders the view through Laravel, or by deleting the Blade file if it is genuinely unused.

Baseline Format

The baseline stores uncovered views by normalized path and content hash. It also stores the include/exclude fingerprint so the run can warn when the configuration has changed since the baseline was generated (re-run with --blade-coverage-update-baseline to refresh it). The warning is informational and does not change the exit code:

Older baselines that contain only a path-to-hash object are still supported.

Publishing To Packagist

This package is ready for normal Composer distribution once the GitHub repository is public and tagged.

  1. Log in to Packagist.
  2. Open Submit Package.
  3. Enter the public repository URL:

  4. Submit the package. Packagist reads the package name from composer.json.
  5. Enable the GitHub/Packagist hook when prompted so new tags update immediately.

After Packagist accepts it, consumers can remove the Composer repositories VCS entry and install the package normally:


All versions of pest-plugin-blade-coverage with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package capell-app/pest-plugin-blade-coverage contains the following files

Loading the files please wait ...