PHPackages                             sackrin/fission - 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. sackrin/fission

ActiveLibrary

sackrin/fission
===============

PHP Object schema builder with validation and access control

10PHP

Since Mar 18Pushed 8y ago1 watchersCompare

[ Source](https://github.com/sackrin/fission)[ Packagist](https://packagist.org/packages/sackrin/fission)[ RSS](/packages/sackrin-fission/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Fission PHP Object Schema
=========================

[](#fission-php-object-schema)

A simple to use and extendable php object schema library

[![Latest Stable Version](https://camo.githubusercontent.com/3971b406484356ea7332f3ffa84a775310cc845e24613f7eceaf7ef38617ba5a/68747470733a2f2f706f7365722e707567782e6f72672f7361636b72696e2f66697373696f6e2f762f737461626c652e737667)](https://packagist.org/packages/sackrin/fission)[![License](https://camo.githubusercontent.com/e3716519f8ef810b5a530abf8da646bcaf882bd0249a2dc758617e184e06abf1/68747470733a2f2f706f7365722e707567782e6f72672f7361636b72696e2f66697373696f6e2f6c6963656e73652e737667)](https://packagist.org/packages/sackrin/fission)[![Build Status](https://camo.githubusercontent.com/4ca683cee9bd323bd49d4e6c0cb26d82bbe3618eb1201f1851b7774276e81f21/68747470733a2f2f7472617669732d63692e6f72672f7361636b72696e2f66697373696f6e2e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/4ca683cee9bd323bd49d4e6c0cb26d82bbe3618eb1201f1851b7774276e81f21/68747470733a2f2f7472617669732d63692e6f72672f7361636b72696e2f66697373696f6e2e7376673f6272616e63683d6d6173746572)

Add to your project using composer

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

[](#installation)

Via composer:

`composer require sackrin/fission`

Example Simple Usage
--------------------

[](#example-simple-usage)

```
// Create a new Atom instance
// This will hold the object schema
$atom = Atom::create('person');

// Create some fields to be added to the schema
// These are called nucleus and describe schema properties
$nuclei = [
    Nucleus::create('first_name')
        ->type(Type::string())
        ->label('First Name')
        ->policies([
            Deny::for("*")->scope("*"),
            Allow::for(["administrator","owner"])->scope(["r","w"]),
            Allow::for("user")->scope(["r"])
        ])
        ->sanitizers([
            GUMPSanitizer::using("trim|sanitize_string")
        ])
        ->validators([
            GUMPValidator::against("required|min_len,5")
        ])
];

// Inject the nucleus instances into the atom
// The collective of nucleus is nuclei (just fyi)
$atom->nuclei($nuclei);

// The reactor instance is used to react the atom schema with the nuclei against data
// This is where you will get a hydrated object tree of data
$reactor = Reactor::using($atom)
    ->roles(['user'])
    ->scope(['w','r']);

// Reactors will output a tree of isotopes using the with method
// Isotopes are the hydrated form of a nucleus instance and contain values
// Sanitization, Validation and Policy rules are applied to isotopes
// Press is a util class used to combine and supply data to the reactor instance
// You can just use a standard array if you like
$isotopes = $reactor->with(Press::values([
    'first_name' => ' John '
]));

// Pass the isotope through the validator
$validator = Validator::validate($isotopes);

// Check if the validator has detected any errors
if ($validator->hasErrors()) {
    echo "Oh No, Failed Validation!";
    $errors = $validator->errors();
    var_dump($errors);
} // Otherwise if the validator passed
else {
    // Using the Values walker you can scrape the data from the isotope tree
    // This will output a simple array tree representing the processed data
    $values = Values::gather($isotopes)->all();
    echo "Everything Validated!";
    $values = Values::gather($isotopes)->all();
    var_dump($values);
}
```

More Examples
-------------

[](#more-examples)

Refer to the [examples](examples/) folder for how to use fission

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ae6828a8c4d871370b503e3caf597778a1749830555440fa65926dfe0c79326?d=identicon)[sackrin](/maintainers/sackrin)

---

Top Contributors

[![hilaryosborne](https://avatars.githubusercontent.com/u/904184?v=4)](https://github.com/hilaryosborne "hilaryosborne (42 commits)")

### Embed Badge

![Health badge](/badges/sackrin-fission/health.svg)

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

PHPackages © 2026

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