PHPackages                             suminagashi/figures - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. suminagashi/figures

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

suminagashi/figures
===================

Statistics for your symfony app, simply.

013PHP

Since Aug 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/suminagashi/figures)[ Packagist](https://packagist.org/packages/suminagashi/figures)[ RSS](/packages/suminagashi-figures/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#Figures

**Statistics for your symfony app, simply.**

Install the bundle :
--------------------

[](#install-the-bundle-)

> Flex recipe incoming...

### Register the bundle :

[](#register-the-bundle-)

```
// config/bundles.php

return [
    ...
    Suminagashi\FiguresBundle\FiguresBundle::class => ['all' => true],
];
```

### Add the Figure entity to your database :

[](#add-the-figure-entity-to-your-database-)

```
php bin/console doctrine:schema:update --force
```

### Setup your entities :

[](#setup-your-entities-)

First you need to import `Suminagashi\FiguresBundle\Annotation\Watch` annotation. Then you have to write add the key of your stat, the type (cumul or count) and the lifecycle (at which lifecycle you want the stat to register).

```
use Suminagashi\FiguresBundle\Annotation\Watch;

class Product
{
    //...

    /**
     *
     * @ORM\Column(type="integer")
     *
     * @Watch(key="product:price", type="cumul", lifecycle="update")
     * @Watch(key="product:sell", type="count", lifecycle="create")
     */
    private $price;

    //***
```

### How does this works :

[](#how-does-this-works-)

There is two mode of stats calculation :

- `count` is for counting the number of sales (e.g).
- `cumul` is for calculating the amount of sales (e.g).

### How to get a specific stats :

[](#how-to-get-a-specific-stats-)

First you need to import `Suminagashi\FiguresBundle\Tools\Figures` in your code. Then you can autowire the class and start using it. We provide few methods to help you :

```
$figures = new Figures();

$figures->all('key');
$figures->getToday('key');
$figures->getLastweek('key');
$figures->getLastmonth('key');
$figures->getLastyear('key');
$figures->get('key', 'start', 'end');
```

### Coming :

[](#coming-)

- Stat percentages calculations.
- Statut type
- Better exception handling
- Handle delete (cascade)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d8a2619c73f6a9e21046799ee0a0d3b37c95beb0a1d83bc9ef329e04cf8f44f?d=identicon)[louishrg](/maintainers/louishrg)

---

Top Contributors

[![LouisHrg](https://avatars.githubusercontent.com/u/11090906?v=4)](https://github.com/LouisHrg "LouisHrg (2 commits)")

### Embed Badge

![Health badge](/badges/suminagashi-figures/health.svg)

```
[![Health](https://phpackages.com/badges/suminagashi-figures/health.svg)](https://phpackages.com/packages/suminagashi-figures)
```

PHPackages © 2026

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