PHPackages                             manialib/formatting - 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. manialib/formatting

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

manialib/formatting
===================

Manipulate styles in Maniaplanet strings.

4.2.1(2y ago)110.3k↓50%3[3 issues](https://github.com/manialib/formatting/issues)1MITPHPPHP ^8.1

Since Jan 29Pushed 2y ago3 watchersCompare

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

READMEChangelog (9)Dependencies (4)Versions (20)Used By (1)

Manialib\\Formatting
====================

[](#manialibformatting)

Manialib\\Formatting is a PHP package for manipulating styles in Maniaplanet strings.

Learn more about Maniaplanet formatting characters on the [wiki](https://doc.maniaplanet.com/client/text-formatting).

Beta
----

[](#beta)

[![Build Status](https://camo.githubusercontent.com/60b1be12e1c6c39721fa448be54d3455e959ee12e2b9824e0720eb3519613662/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d616e69616c69622f666f726d617474696e672e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/manialib/formatting)[![Packagist Version](https://camo.githubusercontent.com/1076192ae6aa953fec6e2587ad682313a7f9260f4280e35e9399a8e100ec1912/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d616e69616c69622f666f726d617474696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/manialib/formatting)[![Total Downloads](https://camo.githubusercontent.com/5ade05fbced20eae6c949fadae9814770b7f2862fcf1373ce02125bf7baa8f5c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d616e69616c69622f666f726d617474696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/manialib/formatting)[![SensioLabs Insight](https://camo.githubusercontent.com/26abbe780e69a85b649e3b12b6f3eb1c72804dff547244a935366aa476e28f0f/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f62613261636539362d303231632d346436392d386330332d3365666636303863386138382e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/ba2ace96-021c-4d69-8c03-3eff608c8a88)

This is a work in progress. As long as we don't release a stable version, we might break stuff at any point. If this is a problem, feel free to open an issue and we'll try to help.

Features
--------

[](#features)

- Strip styles from strings: links, colors, etc.
- Convert strings to other formats: HTML for now

Find out more in the [change log](CHANGELOG.md).

Requirements
------------

[](#requirements)

- PHP 8.1+

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

[](#installation)

[Install via Composer](https://getcomposer.org/):

```
{
	"require": {
        "manialib/formatting": "^4.0"
    }
}
```

Usage
-----

[](#usage)

Modify styles of a string:

> Note the String fluent interface which allows to chain method calls

```
use Manialib\Formatting\ManiaplanetString;

$nickname = '$l[https://github.com/manialib/formatting]$cfeg$fff๐u1 $666ツ$l';

$string = new ManiaplanetString($nickname);
echo $string->stripColors()->stripLinks();
```

Will output:

```
g๐u1 ツ

```

Convert a string to HTML:

```
use Manialib\Formatting\ManiaplanetString;

$string = new ManiaplanetString('$cfeg$fff๐u1 $666ツ');

echo $string->toHtml();
```

Will output:

```
g๐u1 ツ
```

Everything you need for using this should be documented in [`Manialib/Formatting/StringInterface`](src/Manialib/Formatting/StringInterface.php).

Tests
-----

[](#tests)

`$ php vendor/bin/phpunit`

`$ php vendor/bin/phpcs --standard=PSR2 src`

Development guidelines
----------------------

[](#development-guidelines)

We follow best practices from the amazing PHP ecosystem. Warm kudos to [Symfony](http://symfony.com/), [The PHP League](http://thephpleague.com/), [the PHP subreddit](http://www.reddit.com/r/PHP/) and many more for inspiration and challenging ideas.

- We adhere to the best-practices put forward by [PHP The Right Way](http://www.phptherightway.com/)
- We comply to the standards of the [PHP-FIG](http://www.php-fig.org/)
- We distribute code via [Packagist](https://packagist.org/) and [Composer](https://getcomposer.org/)
- We manage version numbers with [Semantic Versioning](http://semver.org/)
- We [keep a changelog](http://keepachangelog.com/)
- We use `Manialib\` as our PHP vendor namespace
- We use `manialib/` as our Packagist vendor namespace
- We'll (try to) make documentation &amp; tests :)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 58% 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 ~331 days

Recently: every ~259 days

Total

11

Last Release

817d ago

PHP version history (4 changes)v4.0-betaPHP &gt;=5.5

4.1PHP ^7.1

4.1.3PHP ^7.1 || ^8.0

4.2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/194d53bc2cfc60dd7fc1d45d293fe0e732064c003f91716c9045cb09a985a8a4?d=identicon)[magnetik](/maintainers/magnetik)

![](https://avatars.githubusercontent.com/u/445622?v=4)[Maxime Raoust](/maintainers/gou1)[@gou1](https://github.com/gou1)

![](https://avatars.githubusercontent.com/u/1850524?v=4)[satanasdiabolo](/maintainers/satanasdiabolo)[@satanasdiabolo](https://github.com/satanasdiabolo)

---

Top Contributors

[![gou1](https://avatars.githubusercontent.com/u/445622?v=4)](https://github.com/gou1 "gou1 (51 commits)")[![magnetik](https://avatars.githubusercontent.com/u/345029?v=4)](https://github.com/magnetik "magnetik (29 commits)")[![satanasdiabolo](https://avatars.githubusercontent.com/u/1850524?v=4)](https://github.com/satanasdiabolo "satanasdiabolo (4 commits)")[![Et3rnel](https://avatars.githubusercontent.com/u/43754311?v=4)](https://github.com/Et3rnel "Et3rnel (2 commits)")[![guillaume-bachelier](https://avatars.githubusercontent.com/u/25012549?v=4)](https://github.com/guillaume-bachelier "guillaume-bachelier (2 commits)")

---

Tags

maniaplanetphpManiaPlanetShootManiaTrackManiaManiaLibUbisoftNadeo

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[maniaplanet/dedicated-server-api

XML-RPC library to connect to Maniaplanet server

156.6k3](/packages/maniaplanet-dedicated-server-api)

PHPackages © 2026

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