PHPackages                             willpower232/cloverparser-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. willpower232/cloverparser-laravel

ActiveLibrary[Image &amp; Media](/categories/media)

willpower232/cloverparser-laravel
=================================

A Laravel/Lumen wrapper for willpower232/cloverparser to generate an image and store files

v1.1.0(2y ago)044MITPHPPHP ^7.4 || ^8.0

Since Jun 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/willpower232/cloverparser-laravel)[ Packagist](https://packagist.org/packages/willpower232/cloverparser-laravel)[ RSS](/packages/willpower232-cloverparser-laravel/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (9)Versions (5)Used By (0)

cloverparser-laravel
====================

[](#cloverparser-laravel)

[![run-tests](https://github.com/willpower232/cloverparser-laravel/actions/workflows/run-tests.yml/badge.svg)](https://github.com/willpower232/cloverparser-laravel/actions/workflows/run-tests.yml)[![Coverage](https://camo.githubusercontent.com/03d300f5588e18be22e697cfd74ca101a9d7ccdd91aa5679da44e93323ded551/68747470733a2f2f6c61726176656c2d636f7665726167652e73332e65752d776573742d322e616d617a6f6e6177732e636f6d2f77696c6c706f7765723233322f636c6f7665727061727365722d6c61726176656c2f6d61696e2e737667)](https://camo.githubusercontent.com/03d300f5588e18be22e697cfd74ca101a9d7ccdd91aa5679da44e93323ded551/68747470733a2f2f6c61726176656c2d636f7665726167652e73332e65752d776573742d322e616d617a6f6e6177732e636f6d2f77696c6c706f7765723233322f636c6f7665727061727365722d6c61726176656c2f6d61696e2e737667)

This is a wrapper which takes the percentage coverage generated by [willpower232/cloverparser](https://github.com/willpower232/cloverparser) and then gives you the ability to use Laravel to create a coverage badge SVG using a view and store that image somewhere using the storage class.

This is also compatible with Lumen but I haven't figured out how to statically analyse both Lumen and Laravel.

---

A former casual user of [codecov](https://codecov.io) and interested in controlling my own data, I decided to see how complicated it would be to operate a similar setup myself after [their uploader script was compromised](https://www.theregister.com/2021/04/19/codecov_warns_of_stolen_credentials/).

This is the second part of this project, turning the coverage percentage into something displayable and storing that somewhere easily accessible.

---

Installation
------------

[](#installation)

```
composer require willpower232/cloverparser-laravel

```

Usage
-----

[](#usage)

Set a path to your CloverParser instance and then you can store files. Paths are made up of a project folder and a branch as the base name of the file.

Storing files in a folder per project and with the branch name as the file name should allow the files to be structured in a way that makes sense and also in a way that allows for future use without having to look anything else up. As a branch continues and is tested more often, stale files are replaced so that only the most recent are stored.

If you are looking to create a dataset of coverage over time, you can record the percentages as you wish in your application (or even prefix the clover file names to avoid overwriting them).

```
use WillPower232\CloverParserLaravel\CloverParser;

$urlToSVG = app(CloverParser::class)
	->setPath($project, $branch)
	->addFile($pathToCloverFile)
	->storeImage();
```

You could also store other files for your future reference.

```
use WillPower232\CloverParserLaravel\CloverParser;

$parser = app(CloverParser::class)
	->setPath($project, $branch)
	->addFile($pathToCloverFile);

$urlToSVG = $parser->storeImage();

$urlToFile = $parser->store("$branch.clover", file_get_contents($pathToCloverFile));
```

Alternatively, making more use of Laravel

```
$file = new \Illuminate\Http\File($pathToCloverFile);

$parser = app(CloverParser::class)
	->setPath($project, $branch)
	->addFile($file);

$urlToFile = $parser->store("$branch.clover", $file);
```

or via upload directly

```
$file = $request->file('file');

$parser = app(CloverParser::class)
	->setPath($project, $branch)
	->addFile($file);

$urlToFile = $parser->store("$branch.clover", $file);
```

Don't forget to validate user uploaded files before hosting them yourself.

Configuration
-------------

[](#configuration)

If you want to store the files in a different disk, you can specify its name in your environment.

```
CLOVER_PARSER_DISK=s3
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~329 days

Total

4

Last Release

843d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fca2ffc81ebd50445c0a05338ba2dacc6d2ee8f483b05664ed712eb8716a74cb?d=identicon)[willpower232](/maintainers/willpower232)

---

Top Contributors

[![willpower232](https://avatars.githubusercontent.com/u/1619102?v=4)](https://github.com/willpower232 "willpower232 (6 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/willpower232-cloverparser-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/willpower232-cloverparser-laravel/health.svg)](https://phpackages.com/packages/willpower232-cloverparser-laravel)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.0k](/packages/craftcms-cms)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[intervention/image-laravel

Laravel Integration of Intervention Image

1588.9M172](/packages/intervention-image-laravel)[ralphjsmit/laravel-glide

Auto-magically generate responsive images from static image files.

4924.8k5](/packages/ralphjsmit-laravel-glide)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
