PHPackages                             munusphp/munus - 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. munusphp/munus

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

munusphp/munus
==============

Power of object-oriented programming with the elegance of functional programming.

0.17.0(1y ago)16989.2k↑14.2%13[1 issues](https://github.com/munusphp/munus/issues)[1 PRs](https://github.com/munusphp/munus/pulls)1MITPHPPHP ^8.1

Since Nov 29Pushed 1y ago9 watchersCompare

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

READMEChangelog (10)Dependencies (5)Versions (26)Used By (1)

Munus
=====

[](#munus)

[![Minimum PHP Version](https://camo.githubusercontent.com/183804d09fec16ca7b6209b007250b7d8db1b915042feb093a9f20e6e1f25359/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e312d3838393242462e737667)](https://php.net/)[![github action](https://github.com/munusphp/munus/workflows/build/badge.svg)](https://github.com/munusphp/munus/actions?query=workflow%3Abuild)[![Latest Stable Version](https://camo.githubusercontent.com/e96ed3d81fe607f708dcc30bd975c5871cbe4a0d8eb8c46af351c75a8a77d6c7/68747470733a2f2f706f7365722e707567782e6f72672f6d756e75737068702f6d756e75732f762f737461626c653f666f726d61743d666c6174)](https://packagist.org/packages/munusphp/munus)[![codecov](https://camo.githubusercontent.com/af4d593c6c56dcf293d9fa14cdc5312f567c9ee636f4c98fa8f3a6f5d77da22a/68747470733a2f2f636f6465636f762e696f2f67682f6d756e75737068702f6d756e75732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/munusphp/munus)[![Total Downloads](https://camo.githubusercontent.com/14b3e2981829c6f854fd02847b7121500f71f0743ec339e65a0a4bd4955149a7/68747470733a2f2f706f7365722e707567782e6f72672f6d756e75737068702f6d756e75732f646f776e6c6f6164733f666f726d61743d666c6174)](https://packagist.org/packages/munusphp/munus)[![GitHub](https://camo.githubusercontent.com/cc489f5d48caa99b36eacedb04e8ebf75dd38e1076a789cfd7988a4850ef0c5c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d756e75737068702f6d756e7573)](https://camo.githubusercontent.com/cc489f5d48caa99b36eacedb04e8ebf75dd38e1076a789cfd7988a4850ef0c5c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d756e75737068702f6d756e7573)

Power of object-oriented programming with the elegance of functional programming. Increase the robustness with reduced amount of code.

At the moment, in the experimental phase.

**[Documentation](https://munusphp.github.io/docs/start)**

Due to the lack of generic types, Munus achieves genericity with the help of [PHPStan](https://phpstan.org/blog/generics-in-php-using-phpdocs) `template` annotation.

Stream example: find the sum of the first ten squares of even numbers

```
Stream::from(1)
    ->filter(fn($n) => $n%2===0)
    ->map(fn($n) => $n**2)
    ->take(10)
    ->sum();
```

Other examples:

```
/** @var Stream $stream */
$stream = Stream::range(1, 10)->map(function(int $int): int {return $int * 5});

/** @var Option $option */
$option = Option::of(domainOperation());

/** @return Either */
function domainOperation(): Either {}

/** @var TryTo $result */
$result = TryTo::run(function(){throw new \DomainException('use ddd');});
$result->getOrElse(new Result())
```

The goal is to help achieve: **Psalm was able to infer types for 100% of the codebase**

### Features

[](#features)

**Values:**

- TryTo
- Either
- Option
- Lazy

**Collections:**

- Set
- Stream (implemented as lazy linked list)
- GenericList (implemented as immutable linked list)
- Iterator

**Other:**

- Tuple

### Roadmap

[](#roadmap)

- Pattern matching
- Property checking

Inspiration
-----------

[](#inspiration)

This library is inspired by [vavr.io](https://www.vavr.io/)

License
-------

[](#license)

Munus is released under the MIT Licence. See the bundled LICENSE file for details.

Author
------

[](#author)

[@ArkadiuszKondas](https://twitter.com/ArkadiuszKondas)

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity48

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 93.4% 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 ~76 days

Recently: every ~52 days

Total

25

Last Release

526d ago

PHP version history (4 changes)0.1.0-rc.1PHP ^7.2

0.3.0PHP ^7.2 || ^8.0

0.5.0PHP ^8.0

0.6.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d00e1e73a4ff379162b943421469055929a95e7a6ce4c3808976dcc1fa28f4f?d=identicon)[akondas](/maintainers/akondas)

---

Top Contributors

[![akondas](https://avatars.githubusercontent.com/u/8239917?v=4)](https://github.com/akondas "akondas (128 commits)")[![mtk3d](https://avatars.githubusercontent.com/u/12657846?v=4)](https://github.com/mtk3d "mtk3d (5 commits)")[![marmichalski](https://avatars.githubusercontent.com/u/57528542?v=4)](https://github.com/marmichalski "marmichalski (2 commits)")[![snapshotpl](https://avatars.githubusercontent.com/u/312655?v=4)](https://github.com/snapshotpl "snapshotpl (1 commits)")[![unixslayer](https://avatars.githubusercontent.com/u/1131246?v=4)](https://github.com/unixslayer "unixslayer (1 commits)")

---

Tags

functional-programminghacktoberfestimmutable-collectionsimmutable-objectsobject-functionalphpstream

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/munusphp-munus/health.svg)

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

###  Alternatives

[symplify/php-config-printer

Print Symfony services array with configuration to to plain PHP file format thanks to this simple php-parser wrapper

322.3M](/packages/symplify-php-config-printer)[ericlagarda/nova-text-card

A custom card for Laravel Nova to show Text in cards with some good options

20388.6k2](/packages/ericlagarda-nova-text-card)[abdelhamiderrahmouni/filament-monaco-editor

A monaco editor form field for filamentphp.

18182.2k](/packages/abdelhamiderrahmouni-filament-monaco-editor)[igorescobar/jquery-mask-plugin

A jQuery Plugin to make masks on form fields and html elements.

11258.2k4](/packages/igorescobar-jquery-mask-plugin)

PHPackages © 2026

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