PHPackages                             leodido/conversio - 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. leodido/conversio

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

leodido/conversio
=================

A library that provides a simple infrastructure to create your own converters and to perform any conversion you want

v0.3.0(5y ago)253.4k↑97.6%1[1 issues](https://github.com/leodido/conversio/issues)1ISCPHPPHP &gt;=5.4CI failing

Since Dec 16Pushed 5y ago1 watchersCompare

[ Source](https://github.com/leodido/conversio)[ Packagist](https://packagist.org/packages/leodido/conversio)[ GitHub Sponsors](https://github.com/leodido)[ RSS](/packages/leodido-conversio/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (2)Versions (6)Used By (1)

Conversio
=========

[](#conversio)

[![Latest Stable Version](https://camo.githubusercontent.com/97d216d743207bc82142be94b1d1632db9a8228374419a7968ad4c8ba155cd86/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c656f6469646f2f636f6e76657273696f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/leodido/conversio) [![Build Status](https://camo.githubusercontent.com/8ec18075d9b47d112d1545a36ac7a16b4621a1bd0bfc748a49c19200bdc770ca/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c656f6469646f2f636f6e76657273696f2e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/leodido/conversio) [![Coverage](https://camo.githubusercontent.com/c18ce4cf5f25b9367e0721a8b398d5f8c55fbb9eb9b7ba883524663c449ac2cc/687474703a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6c656f6469646f2f636f6e76657273696f2e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/leodido/conversio)

Conversio is a PHP library that provides a simple infrastructure to create your own converters and to perform any conversion.

Explaination
------------

[](#explaination)

The entry point for **conversion** is the class `Conversion`, that acts as a **filter** (i.e., `Zend\Filter\AbstractFilter`).

To implement a conversion you have to create an **adapter** (that will be passed to `Conversion` class) that describes its process.

The adapters must implement the `ConversionAlgorithmInterface` interface.

Furthermore, adapters can have **options** too, in the form of a `Zend\Stdlib\AbstractOptions` subclass. Conversio library requires only that the options class of each adapter is called with the name of the adapter followed by the suffix "Options" (e.g., `LanguageCodeOptions` is the option class of `LanguageCode` adapter class).

In this case your adapter can extend `AbstractOptionsEnabledAdapter` abstract class to take advantage of its options related methods.

The `OptionsMap` class is an utility class aimed to create a option class starting from a configuration hash that describes the options (by name) and their admitted values.

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

[](#installation)

Add `leodido/conversio` to your `composer.json`.

```
{
   "require": {
       "leodido/conversio": "v0.3.0"
   }
}
```

Usage
-----

[](#usage)

**WIP**

Converters
----------

[](#converters)

Here will be listed the converters created using Conversio library.

- [LangCode](https://github.com/leodido/langcode-conv)

---

[![Analytics](https://camo.githubusercontent.com/c426597b3dfbc12526bc2bb8d3092c1cf34d493fc2c9c9127dc3e15653931666/68747470733a2f2f67612d626561636f6e2e61707073706f742e636f6d2f55412d34393635373137362d312f636f6e76657273696f)](https://github.com/igrigorik/ga-beacon)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Total

4

Last Release

1849d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/120051?v=4)[Leo Di Donato](/maintainers/leodido)[@leodido](https://github.com/leodido)

---

Top Contributors

[![leodido](https://avatars.githubusercontent.com/u/120051?v=4)](https://github.com/leodido "leodido (33 commits)")

---

Tags

convertlibraryconversionconverterconversionsconverters

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[iamcal/php-emoji

This is a PHP library for dealing with Emoji, allowing you to convert between various native formats and displaying them using HTML.

1.3k550.9k](/packages/iamcal-php-emoji)[ssnepenthe/color-utils

A PHP library for performing SASS-like color manipulations.

631.2M16](/packages/ssnepenthe-color-utils)[zman/zman

A Jewish date converter and helper.

177.6k](/packages/zman-zman)[delight-im/base-convert

Conversion of arbitrarily large numbers between any two bases or alphabets

161.5k](/packages/delight-im-base-convert)

PHPackages © 2026

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