PHPackages                             badges/poser - 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. badges/poser

ActiveLib

badges/poser
============

Poser, add badges on your readme..

v3.3.0(5mo ago)14174.8k↓15.6%43[7 issues](https://github.com/badges/poser/issues)[2 PRs](https://github.com/badges/poser/pulls)8MITPHPPHP ^8.1CI failing

Since Aug 24Pushed 4mo ago9 watchersCompare

[ Source](https://github.com/badges/poser)[ Packagist](https://packagist.org/packages/badges/poser)[ Docs](https://github.com/PUGX)[ Fund](https://paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ETT4JRJARLTSC)[ GitHub Sponsors](https://github.com/AlessandroMinoccheri)[ RSS](/packages/badges-poser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (30)Used By (8)

PHP badges poser [![GitHub actions](https://github.com/badges/poser/workflows/Build/badge.svg)](https://github.com/badges/poser/actions)
========================================================================================================================================

[](#php-badges-poser-)

This is a php library that creates badges like [![Badge Poser](https://camo.githubusercontent.com/405742e27baa61741c7ef073276797dc025630412c66feff5e721f0156b2d4cb/68747470733a2f2f63646e2e7261776769742e636f6d2f6261646765732f706f7365722f6d61737465722f62616467652d706f7365722e737667)](https://camo.githubusercontent.com/405742e27baa61741c7ef073276797dc025630412c66feff5e721f0156b2d4cb/68747470733a2f2f63646e2e7261776769742e636f6d2f6261646765732f706f7365722f6d61737465722f62616467652d706f7365722e737667) and [![I'm a badge](https://camo.githubusercontent.com/045c7d27de78a91f7cfba8cf379b3912cade5a8ac13782ce05e3e74941be91d3/68747470733a2f2f63646e2e7261776769742e636f6d2f6261646765732f706f7365722f6d61737465722f695f6d2d62616467652e737667)](https://camo.githubusercontent.com/045c7d27de78a91f7cfba8cf379b3912cade5a8ac13782ce05e3e74941be91d3/68747470733a2f2f63646e2e7261776769742e636f6d2f6261646765732f706f7365722f6d61737465722f695f6d2d62616467652e737667) and [![dark](https://camo.githubusercontent.com/5d11c97e2f7b52a889a4111249bc3effdd48e29916dd574bfcbcd3cdec11aa20/68747470733a2f2f63646e2e7261776769742e636f6d2f6261646765732f706f7365722f6d61737465722f746f6461792d6461726b2e737667)](https://camo.githubusercontent.com/5d11c97e2f7b52a889a4111249bc3effdd48e29916dd574bfcbcd3cdec11aa20/68747470733a2f2f63646e2e7261776769742e636f6d2f6261646765732f706f7365722f6d61737465722f746f6461792d6461726b2e737667), according to [Shields specification](https://github.com/badges/shields#specification).

This library is used by

[![Latest Stable Version](https://camo.githubusercontent.com/d84e2d66d1ec0bc099b362429d74a976ff11151fe4acedf3e78e3df1db41fb9d/68747470733a2f2f706f7365722e707567782e6f72672f6261646765732f706f7365722f76657273696f6e2e737667)](https://packagist.org/packages/badges/poser) [![Latest Unstable Version](https://camo.githubusercontent.com/a209786136f8565ea1e2dcab7165cd82d85c18a52eb888e4a3a543fc48f1dbc1/68747470733a2f2f706f7365722e707567782e6f72672f6261646765732f706f7365722f762f756e737461626c652e737667)](//packagist.org/packages/badges/poser) [![Total Downloads](https://camo.githubusercontent.com/7e9c0a306c8320a2eaa79d8557858cac409583d199003ae2ec581864d4d25ced/68747470733a2f2f706f7365722e707567782e6f72672f6261646765732f706f7365722f646f776e6c6f6164732e737667)](https://packagist.org/packages/badges/poser)[![Github actions Build](https://github.com/badges/poser/workflows/Build/badge.svg)](//packagist.org/packages/badges/poser)[![PHP Version Require](https://camo.githubusercontent.com/916d0b93f1fd2dd3db65394e075ae19fa1c8cd878e7d18d28259fd15161dc266/687474703a2f2f706f7365722e707567782e6f72672f6261646765732f706f7365722f726571756972652f706870)](https://packagist.org/packages/badges/poser)

Dependencies
------------

[](#dependencies)

- PHP 8.1 or higher
- GD extension

you can still use the library with lower PHP versions, using the old releases

Use as command
--------------

[](#use-as-command)

#### 1. Create a project

[](#1-create-a-project)

```
composer create-project badges/poser
ln -s poser/bin/poser /usr/local/bin/poser
```

#### 2. Launch the command

[](#2-launch-the-command)

Create an image

```
poser license MIT blue -p "license.svg"
```

Flush an image

```
poser license MIT blue
```

Choose a different style

```
poser license MIT blue -s "for-the-badge"
```

You can also use the provided Docker Compose services:

```
docker compose run --rm php82 bin/poser license MIT blue
docker compose run --rm php83 bin/poser license MIT blue -p "license.svg"
docker compose run --rm php83 bin/poser license MIT blue -s "plastic" -p "license-plastic.svg"
```

Usage as library
----------------

[](#usage-as-library)

#### 1. Add to composer dependencies

[](#1-add-to-composer-dependencies)

```
composer require badges/poser
```

#### 2. Use in your project as lib

[](#2-use-in-your-project-as-lib)

```
use PUGX\Poser\Render\SvgPlasticRender;
use PUGX\Poser\Poser;

$render = new SvgPlasticRender();
$poser = new Poser([$render]);

echo $poser->generate('license', 'MIT', '428F7E', 'plastic');
// or
echo $poser->generateFromURI('license-MIT-428F7E.svg?style=plastic');
// or
echo $poser->generateFromURI('license-MIT-428F7E?style=plastic');
// or
$image = $poser->generate('license', 'MIT', '428F7E', 'plastic');

echo $image->getStyle();
```

The allowed styles are: `plastic`, `flat`, `flat-square`, and `for-the-badge`.

### Examples (generated with `make doc-images`)

[](#examples-generated-with-make-doc-images)

[![Flat style](doc/flat.svg)](doc/flat.svg)

[![Flat square style](doc/flat-square.svg)](doc/flat-square.svg)

[![Plastic style](doc/plastic.svg)](doc/plastic.svg)

[![For the badge style](doc/for-the-badge.svg)](doc/for-the-badge.svg)

Encoding
--------

[](#encoding)

Dashes `--` → `-` Dash

Underscores `__` → `_` Underscore

`_` or Space → Space

More
----

[](#more)

For *more info* please see the [behat features](./features/)and the examples in the [php-spec folder](./spec/)

Why a composer badge?
---------------------

[](#why-a-composer-badge)

Not only because all the other languages already have it, but having the latest stable release in the readme could save time.

Contributing
------------

[](#contributing)

Active contribution and patches are very welcome.
Please refer to [CONTRIBUTING](CONTRIBUTING.md)

Docker development
------------------

[](#docker-development)

You can use the env var CONTAINER to run the tests in a specific PHP version. The default version if CONTAINER is omitted is php83.

#### 1. Setup your Docker environment

[](#1-setup-your-docker-environment)

```
CONTAINER=php83 make setup
```

#### 2. Run the tests

[](#2-run-the-tests)

```
CONTAINER=php83 make tests
```

#### 3. Run the tests for all PHP versions

[](#3-run-the-tests-for-all-php-versions)

```
make matrix-tests
```

License
-------

[](#license)

[![License](https://camo.githubusercontent.com/835094a17e408cac6b41a407f30ed2932d5ba86e116bf431593f2bf9e479af78/68747470733a2f2f706f7365722e707567782e6f72672f6261646765732f706f7365722f6c6963656e73652e737667)](./LICENSE)

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance73

Regular maintenance activity

Popularity48

Moderate usage in the ecosystem

Community34

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~187 days

Total

23

Last Release

160d ago

Major Versions

v1.4.1 → v2.0.02020-07-29

v2.3.1 → v3.0.02023-12-11

PHP version history (3 changes)1.2.1PHP &gt;=5.3

v2.0.0PHP &gt;=7.4

v3.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/446a646f719434553ab25f0f931d28ec09fbb036528126ac7e9d54a2e8132581?d=identicon)[liuggio](/maintainers/liuggio)

![](https://www.gravatar.com/avatar/8dab7be39a6adf2b47f924eed2d1cc45b1e37e292557f4395961a00651d3bff5?d=identicon)[JellyBellyDev](/maintainers/JellyBellyDev)

---

Top Contributors

[![JellyBellyDev](https://avatars.githubusercontent.com/u/190820?v=4)](https://github.com/JellyBellyDev "JellyBellyDev (87 commits)")[![jmleroux](https://avatars.githubusercontent.com/u/1516770?v=4)](https://github.com/jmleroux "jmleroux (43 commits)")[![liuggio](https://avatars.githubusercontent.com/u/530406?v=4)](https://github.com/liuggio "liuggio (25 commits)")[![AlessandroMinoccheri](https://avatars.githubusercontent.com/u/3356506?v=4)](https://github.com/AlessandroMinoccheri "AlessandroMinoccheri (14 commits)")[![garak](https://avatars.githubusercontent.com/u/179866?v=4)](https://github.com/garak "garak (12 commits)")[![antonkomarev](https://avatars.githubusercontent.com/u/1849174?v=4)](https://github.com/antonkomarev "antonkomarev (10 commits)")[![ricardoboss](https://avatars.githubusercontent.com/u/6266356?v=4)](https://github.com/ricardoboss "ricardoboss (7 commits)")[![GregOriol](https://avatars.githubusercontent.com/u/3975044?v=4)](https://github.com/GregOriol "GregOriol (5 commits)")[![fefas](https://avatars.githubusercontent.com/u/6557756?v=4)](https://github.com/fefas "fefas (2 commits)")[![Jean85](https://avatars.githubusercontent.com/u/6729988?v=4)](https://github.com/Jean85 "Jean85 (1 commits)")[![Haehnchen](https://avatars.githubusercontent.com/u/1011712?v=4)](https://github.com/Haehnchen "Haehnchen (1 commits)")[![PeterDaveHello](https://avatars.githubusercontent.com/u/3691490?v=4)](https://github.com/PeterDaveHello "PeterDaveHello (1 commits)")

---

Tags

badge-poserhacktoberfestphpphp-libraryposercomposerbadgepinpackagist

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[maglnet/composer-require-checker

CLI tool to analyze composer dependencies and verify that no unknown symbols are used in the sources of a package

99810.9M671](/packages/maglnet-composer-require-checker)[ion-bazan/composer-diff

Compares composer.lock changes and generates Markdown report so you can use it in PR description.

1861.8M3](/packages/ion-bazan-composer-diff)[knplabs/packagist-api

Packagist API client.

1821.3M34](/packages/knplabs-packagist-api)[playbloom/satisfy

Satis composer repository manager with a Web UI

54510.6k](/packages/playbloom-satisfy)[cybercog/laravel-paket

Composer personal web interface. Manage Laravel dependencies without switching to command line!

1753.3k](/packages/cybercog-laravel-paket)[linkorb/autotune

Tune your autoloader

177.0k17](/packages/linkorb-autotune)

PHPackages © 2026

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