PHPackages                             memran/marwa-entity - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. memran/marwa-entity

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

memran/marwa-entity
===================

Fluent Entity Builder and validation library. define once, protect everywhere.

v1.0.0(1mo ago)0972MITPHPPHP &gt;=8.2CI passing

Since Mar 30Pushed 1mo agoCompare

[ Source](https://github.com/memran/marwa-entity)[ Packagist](https://packagist.org/packages/memran/marwa-entity)[ RSS](/packages/memran-marwa-entity/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (2)

Marwa Entity
============

[](#marwa-entity)

[![Latest Version](https://camo.githubusercontent.com/322ee7d2cd27c0ec927017853f1b8950bb9704df7d8dfca68afa90ae2c27deae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d656d72616e2f6d617277612d656e746974792e737667)](https://packagist.org/packages/memran/marwa-entity)[![Total Downloads](https://camo.githubusercontent.com/7119569f48bee02bf0d57b7be4f4ecb843423beebac49625d272fd47bea8841e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d656d72616e2f6d617277612d656e746974792e737667)](https://packagist.org/packages/memran/marwa-entity)[![License](https://camo.githubusercontent.com/af3cd3b1384e8e33b8a09152c13c1a4178fd10ced939cb188460e43bac43b2fd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d656d72616e2f6d617277612d656e746974792e737667)](https://packagist.org/packages/memran/marwa-entity)[![PHP Version](https://camo.githubusercontent.com/4f91fcd0c20fbaa9599711dba40f869927ca4fe239b5e707a9ed9e5a9dd7bd75/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d656d72616e2f6d617277612d656e746974792e737667)](https://packagist.org/packages/memran/marwa-entity)[![CI](https://github.com/memran/marwa-entity/actions/workflows/ci.yml/badge.svg)](https://github.com/memran/marwa-entity/actions/workflows/ci.yml)[![Coverage](https://camo.githubusercontent.com/ec20d2381e29d05793fab7606f9d28aa8d8d77b2df81fbf7f320a33f382ae4bc/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6d656d72616e2f6d617277612d656e746974792e737667)](https://codecov.io/gh/memran/marwa-entity)[![PHPStan](https://camo.githubusercontent.com/b6d441ad4fe8332cb16c72aa27f22cc685181dfd74ae34964afc92c6c1146b3c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c2532306d61782d627269676874677265656e2e737667)](https://phpstan.org/)

Framework-agnostic entity schema, validation, sanitization, form metadata, and migration metadata for PHP 8.2+.

The package is designed around a single schema definition that can be reused across request validation, typed hydration, UI generation, and migration planning without coupling to a specific framework.

Sanitizer and helper plumbing is shared with `memran/marwa-support`, which keeps the package smaller and avoids repeating low-level string and pipeline utilities.

Features
--------

[](#features)

- Define fields, types, rules, sanitizers, and metadata in one place
- Reuse the same schema for validation, hydration, form rendering, and migration export
- Integrate with PSR-7 and PSR-15 request pipelines
- Extend rules and sanitizers through factories and registries
- Keep framework dependencies out of the core package

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Composer
- PSR-compatible HTTP message interfaces when using the HTTP layer

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

[](#installation)

```
composer require memran/marwa-entity
```

For development:

```
composer install
```

Quick Start
-----------

[](#quick-start)

```
