PHPackages                             chevere/message - 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. chevere/message

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

chevere/message
===============

Strings with template tags support

1.0.0(2y ago)624.6k↑14.4%15Apache-2.0PHPPHP ^8.1CI passing

Since Nov 30Pushed 1y agoCompare

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

READMEChangelog (2)Dependencies (3)Versions (4)Used By (15)

Message
=======

[](#message)

[![Chevere](chevere.svg)](chevere.svg)

[![Build](https://camo.githubusercontent.com/8cc757e42d6d78f9c135a5c343a54e861a5bc586f68396ef25bbf5985838bb0a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636865766572652f6d6573736167652f746573742e796d6c3f6272616e63683d312e30267374796c653d666c61742d737175617265)](https://github.com/chevere/message/actions)[![Code size](https://camo.githubusercontent.com/0e248ab663a41df0516da478048588a3a4e88957e31a99a7d15b13d91b66cfff/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f636865766572652f6d6573736167653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/0e248ab663a41df0516da478048588a3a4e88957e31a99a7d15b13d91b66cfff/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f636865766572652f6d6573736167653f7374796c653d666c61742d737175617265)[![Apache-2.0](https://camo.githubusercontent.com/d149148d1620d029393ff66e95baaae009a7887060452da14f0d330fa0222098/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636865766572652f6d6573736167653f7374796c653d666c61742d737175617265)](LICENSE)[![PHPStan](https://camo.githubusercontent.com/6016298b28550819030c76e9327f62501596a31fd76406695bae2f3d2a1f26a4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230392d626c756576696f6c65743f7374796c653d666c61742d737175617265)](https://phpstan.org/)[![Mutation testing badge](https://camo.githubusercontent.com/e4556ff2d28a61c89df33c8707492b0e95ec4906481280116d32cbbf6b0fa996/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742d7371756172652675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d253246636865766572652532466d657373616765253246312e30)](https://dashboard.stryker-mutator.io/reports/github.com/chevere/message/1.0)

[![Quality Gate Status](https://camo.githubusercontent.com/63dc1278412e38c61619a4a5f74dfdde075ad810f31a6e81481f6fada50df626/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d636865766572655f6d657373616765266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=chevere_message)[![Maintainability Rating](https://camo.githubusercontent.com/fdc34b706f93b1899cf14c33bebd3234dcf39aa43d6419dca6d45ebda36b57cb/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d636865766572655f6d657373616765266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/dashboard?id=chevere_message)[![Reliability Rating](https://camo.githubusercontent.com/10780cc67b41812601c53468c7b07b7d75e4a41fc549a4efbddb908078f6c91e/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d636865766572655f6d657373616765266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/dashboard?id=chevere_message)[![Security Rating](https://camo.githubusercontent.com/bf0190a3342401525bafa41c9942fb945dad31da21f3b5e884fcdd1509e08f76/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d636865766572655f6d657373616765266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/dashboard?id=chevere_message)[![Coverage](https://camo.githubusercontent.com/cc2f728891e3b160b6a02dc51785ae9bf3c8d477247e043074c1b2bd26c06321/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d636865766572655f6d657373616765266d65747269633d636f766572616765)](https://sonarcloud.io/dashboard?id=chevere_message)[![Technical Debt](https://camo.githubusercontent.com/866792a2135617421be80956eef709d3c2863b26e085f79b78c28e47a4c2fbc1/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d636865766572655f6d657373616765266d65747269633d7371616c655f696e646578)](https://sonarcloud.io/dashboard?id=chevere_message)[![CodeFactor](https://camo.githubusercontent.com/47ead2b4428203a44a23f7b3201a6a82d0500c49ee65b88de02742087fbfb9bd/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f636865766572652f6d6573736167652f6261646765)](https://www.codefactor.io/repository/github/chevere/message)

Summary
-------

[](#summary)

Message enables to create strings with template tags support.

Installing
----------

[](#installing)

Message is available through [Packagist](https://packagist.org/packages/chevere/message) and the repository source is at [chevere/message](https://github.com/chevere/message).

```
composer require chevere/message
```

Creating a Message
------------------

[](#creating-a-message)

Use function `message` to create a Message by passing the message template. Use named named arguments to define replacement pairs.

```
use function Chevere\Message\message;

$message = message(
    'Hello, **%tag%**!',
    tag: 'World'
);
```

🪄 Message supports `%tag%`, `{{tag}}` and `{{ tag }}` replacement template tags.

To string
---------

[](#to-string)

The `__toString` method return the message with translated placeholders.

```
$message->__toString();
// Hello, **World**!
```

Utility methods
---------------

[](#utility-methods)

### Template

[](#template)

Use `template` method to return the message template.

```
$message->replacements();
// Hello, **%tag%**!
```

### Replacements

[](#replacements)

Use `replacements` method to read message replacement pairs.

```
$message->replacements();
// ['tag' => 'World']
```

Documentation
-------------

[](#documentation)

Documentation is available at [chevere.org](https://chevere.org/packages/message).

License
-------

[](#license)

Copyright [Rodolfo Berrios A.](https://rodolfoberrios.com/)

Chevere is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity53

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

Total

4

Last Release

438d ago

Major Versions

0.1.x-dev → 1.0.02024-01-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/a87fbbcb1518fe64878bc53dedd9f61b81243cbb21b73c26f5e299d501375984?d=identicon)[rodolfo](/maintainers/rodolfo)

---

Top Contributors

[![rodber](https://avatars.githubusercontent.com/u/20590102?v=4)](https://github.com/rodber "rodber (13 commits)")

---

Tags

cheverephpphp-library

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[magepal/magento2-reindex

Reindex your Magento2 store quickly and easily from backend/admin, instead of command line.

112649.7k1](/packages/magepal-magento2-reindex)[ourcodeworld/name-that-color

A non-official PHP port of the NTC JS library to find out the name of the closest matching color.

37163.5k](/packages/ourcodeworld-name-that-color)[redberry/mcp-client-laravel

Package that enables you access to any mcp server that you define in the config

1345.0k1](/packages/redberry-mcp-client-laravel)[nylle/php-automapper

271.4k](/packages/nylle-php-automapper)

PHPackages © 2026

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