PHPackages                             itsimiro/mi-structure - 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. itsimiro/mi-structure

ActiveProject

itsimiro/mi-structure
=====================

Structure data type

v1.0.0(3y ago)07MITPHPPHP ^8.0

Since Jun 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/miroslaws8/mi-structure)[ Packagist](https://packagist.org/packages/itsimiro/mi-structure)[ RSS](/packages/itsimiro-mi-structure/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

PHP-STRUCTURE
=============

[](#php-structure)

This package is tries to represent a struct from other languages.

### Getting started

[](#getting-started)

```
class MyStructure extends \Structure\Structure
{
    public int $userId = 1;
}

$userId = (new MyStructure())->userId;

// $userId = 1;
```

OR

```
class MyStructure extends \Structure\Structure
{
    #[MapFrom(name: 'user_id')]
    public int $userId;
}

$userData = [
    'user_id' => 10
];

$structure = (new MyStructure($data));

$userId = $structure->userId;
// $userId = 10;

$userId = $structure->getUserId();
// $userId = 10;
```

### Rules

[](#rules)

```
class MyStructure extends \Structure\Structure
{
    #[VariableRules(length: 5, equals: 'Iron Man')]
    public string $name = 'Miro';
}

$userId = (new MyStructure())->name;
// There will be an exception "StructureValidateException"
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

1424d ago

### Community

Maintainers

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

---

Top Contributors

[![miroslaws8](https://avatars.githubusercontent.com/u/78157941?v=4)](https://github.com/miroslaws8 "miroslaws8 (1 commits)")

---

Tags

phptypestructure

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/itsimiro-mi-structure/health.svg)

```
[![Health](https://phpackages.com/badges/itsimiro-mi-structure/health.svg)](https://phpackages.com/packages/itsimiro-mi-structure)
```

###  Alternatives

[zakirullin/mess

Convenient array-related routine &amp; better type casting

21228.9k2](/packages/zakirullin-mess)[strictus/strictus

Strict Typing for local variables in PHP

1606.9k](/packages/strictus-strictus)[webparking/laravel-type-safe-collection

This package provides type-safe extension of the laravel collection, forcing a single type of object.

378.2k](/packages/webparking-laravel-type-safe-collection)

PHPackages © 2026

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