Download the PHP package badges/poser without Composer

On this page you can find all versions of the php package badges/poser. 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 poser

PHP badges poser GitHub actions

This is a php library that creates badges like Badge Poser and I'm a badge and dark, according to Shields specification.

This library is used by https://poser.pugx.org

Latest Stable Version PHP Version Require

Dependencies

You can still use the library with lower PHP versions by using the old releases

Use as a command

1. Create a project

2. Launch the command

Create an image

Flush an image

Choose a different style

The available styles are plastic, flat, flat-square, for-the-badge, and social.

You can also use the provided Docker Compose services:

Usage as library

1. Add to composer dependencies

2. Use in your project as a lib

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

Badge customization

Badges generated from a URI support these query string options:

Option Description
style Badge style: plastic, flat, flat-square, for-the-badge, or social.
labelColor Color for the left side of the badge. Accepts named colors, 6-digit hex, or 3-digit hex.
logo Optional logo as an image URL, data:image/... URI, or SVG path data.
logoColor Color used when logo is SVG path data. Defaults to white. Accepts named colors, 6-digit hex, or 3-digit hex.

Examples:

When these options are used in a URL, encode reserved characters. In particular, encode # as %23, and encode full image/data URLs passed as logo.

The CLI currently exposes style selection with --style; labelColor, logo, and logoColor are available through URI-based generation.

Custom SVG templates

Since v3.4.0, SVG templates use vendorStartX and valueStartX instead of the old vendorStartPosition and valueStartPosition placeholders. If you maintain custom templates, update them before upgrading:

These values are the text center positions multiplied by 10 and are intended to be used with transform="scale(.1)", as the bundled templates do.

The renderer also provides these optional template placeholders: vendorUpper, valueUpper, vendorTextLength, valueTextLength, vendorWidthMinus1, valueWidthMinus1, valueRectX, separatorX, and logoElement.

Examples (generated with make doc-images)

Encoding

Dashes --- Dash

Underscores ___ Underscore

_ or Space → Space

More

For more info please see the behat features

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

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 php85.

1. Set up your Docker environment

2. Run the tests

3. Run the tests for all PHP versions

License


All versions of poser with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-gd Version *
ext-simplexml Version *
cybercog/php-svg-font Version ^1.0
kartsims/easysvg Version ^2.5
symfony/console Version ^5.0 || ^6.0 || ^7.0 || ^8.0
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 badges/poser contains the following files

Loading the files please wait ...