Get support for badges/poser
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
badges/poser
PHP badges poser 
This is a php library that creates badges like and
and
,
according to Shields specification.
This library is used by https://poser.pugx.org
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
1. Create a project
composer create-project badges/poser
ln -s poser/bin/poser /usr/local/bin/poser
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"
Usage as library
1. Add to composer dependencies
composer require badges/poser
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
.
Encoding
Dashes --
→ -
Dash
Underscores __
→ _
Underscore
_
or Space → Space
More
For more info please see the behat features and the examples in the php-spec folder
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
Active contribution and patches are very welcome.
Please refer to CONTRIBUTING
License
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2