PHPackages                             sellerlabs/nucleus - 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. sellerlabs/nucleus

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

sellerlabs/nucleus
==================

Some core PHP utilities

v0.6.0(9y ago)115.6k15MITPHP

Since Jan 12Pushed 9y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (4)Versions (28)Used By (5)

Nucleus [![Build Status](https://camo.githubusercontent.com/f3448d75978df95cab2ecefca1ee0d5a5fa40e74b9e667adec3de318b81ca66f/68747470733a2f2f7472617669732d63692e6f72672f73656c6c65726c6162732f6e75636c6575732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sellerlabs/nucleus) [![](https://camo.githubusercontent.com/2459d58ac79d3b7416912bd2f5ba4ec11d9d92fef4ef3e313a3bbefe467ae7c8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73656c6c65726c6162732f6e75636c6575732e737667)](https://camo.githubusercontent.com/2459d58ac79d3b7416912bd2f5ba4ec11d9d92fef4ef3e313a3bbefe467ae7c8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73656c6c65726c6162732f6e75636c6575732e737667) [![](https://camo.githubusercontent.com/7053f7084dbb8468df79e2e6c66a0034188a9b084d3970292707519c25ea7cfb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f41706947656e2d7265666572656e63652d626c75652e737667)](http://sellerlabs.github.io/nucleus)
================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#nucleus---)

A standalone PHP utility library. Inspired heavily by similar projects like libphutil. Currently used in personal and work projects. Designed to make working wth PHP a little bit nicer and predictable.

Requires HHVM 3.6 or PHP 5.6

Goal
----

[](#goal)

- Provide a consistent API for common operations.
- Gather the most useful bits and snippets under one library.
- Strong emphasis on strict type checking (e.g. `float !== integer`).
- Functional programming ideas and concepts are welcome (I'm new to this).

Core pieces
-----------

[](#core-pieces)

While Nucleus has a bunch of random crap in it, there are some useful classes worth mentioning:

- **Spec**: A multi-purpose constraint checking framework that can be easily extended.
- **Validator**: Built upon Spec, the Validator component provides an interface for generating UX-friendly messages for a SpecResult.
- **Impersonator**: A constructor dependency automocker. Useful for testing classes that have many external dependencies and projects that heavily use container dependency injection.
- **View**: An set of classes and utilities for generating clean and safe HTML/Text. It sort of looks like XHP without the XML or de-sugarized React.js code.
- **Std, Arr, and others**: We all know the PHP standard library is a mess. There are many failed attempts to fix this out there. This is another one of those attempts. I've created a few classes with a bunch of static aliases that attempt to improve upon it. Yes, there is a performance penalty (validation + at least one more function call), but it makes many operations more predictable and safer.

Building documentation
----------------------

[](#building-documentation)

```
cd docs
pip install -r requirements.txt
make html
```

Contributing
------------

[](#contributing)

Pull requests are accepted on GitHub. Bug fixes and small improvements are welcome. Big ideas will be reviewed and discussed.

Code Standard: PSR-2 with some additions. See  for more details.

License
-------

[](#license)

This code is licensed under the MIT license. See LICENSE for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 99.1% 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 ~30 days

Recently: every ~102 days

Total

25

Last Release

3393d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/26ca427cd6065015bb28ebe32044eb50b7bd604185df711c1bb8f9ffc0be3e3a?d=identicon)[5outh](/maintainers/5outh)

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

![](https://www.gravatar.com/avatar/3ad21237581c0f6539d5d7caf73b998f1a1ce94790b4d954aea07a6a61f02b4c?d=identicon)[MarkVaughn](/maintainers/MarkVaughn)

---

Top Contributors

[![etcinit](https://avatars.githubusercontent.com/u/1160305?v=4)](https://github.com/etcinit "etcinit (217 commits)")[![MarkVaughn](https://avatars.githubusercontent.com/u/39970?v=4)](https://github.com/MarkVaughn "MarkVaughn (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

phputilities

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sellerlabs-nucleus/health.svg)

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

###  Alternatives

[spiral/mcp-server

Spiral bridge for MCP server

541.1k2](/packages/spiral-mcp-server)

PHPackages © 2026

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