PHPackages                             shaggy8871/php-rx - 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. shaggy8871/php-rx

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

shaggy8871/php-rx
=================

The Rx schema and validation system

1.0.4(7y ago)119552[4 issues](https://github.com/shaggy8871/php-rx/issues)[1 PRs](https://github.com/shaggy8871/php-rx/pulls)GPL-3.0-or-laterPHPPHP &gt;=7.1.0CI failing

Since Jun 8Pushed 6y ago5 watchersCompare

[ Source](https://github.com/shaggy8871/php-rx)[ Packagist](https://packagist.org/packages/shaggy8871/php-rx)[ RSS](/packages/shaggy8871-php-rx/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

php-rx
======

[](#php-rx)

[![Author](https://camo.githubusercontent.com/82712006441e1418c76bb8d4c1da2934a800615554f99e95ecfa109e58d2b7d8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d40736861676779383837312d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/johnginsberg)[![Software License](https://camo.githubusercontent.com/e1514dd3f2095dbf68a0008ae62a631142953ad2e86aa94c504343f2c2c191da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

PHP implementation of Rx validation library

Based on  with ideas from

What is Rx?
-----------

[](#what-is-rx)

When adding an API to your web service, you have to choose how to encode the data you send across the line. XML is one common choice for this, but it can grow arcane and cumbersome pretty quickly. Lots of webservice authors want to avoid thinking about XML, and instead choose formats that provide a few simple data types that correspond to common data structures in modern programming languages. In other words, JSON and YAML.

Unfortunately, while these formats make it easy to pass around complex data structures, they lack a system for validation. XML has XML Schemas and RELAX NG, but these are complicated and sometimes confusing standards. They're not very portable to the kind of data structure provided by JSON, and if you wanted to avoid XML as a data encoding, writing more XML to validate the first XML is probably even less appealing.

Rx is meant to provide a system for data validation that matches up with JSON-style data structures and is as easy to work with as JSON itself.

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

[](#installation)

```
composer require shaggy8871/php-rx

```

Documentation
-------------

[](#documentation)

[Check out the documentation](http://rx.codesimply.com/)

Usage
-----

[](#usage)

- Create a schema file
- Run `./vendor/bin/rx   [""]`
- Be sure to quote custom type glob!

For example, `./vendor/bin/rx test.yml schema.yml "types/*.yml"`

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

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

Every ~0 days

Total

5

Last Release

2577d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/85f1cd9d950d1b1d6b85ef4d7c27936ab8272dcc5ca24fcf8e7a0117bb2c9828?d=identicon)[shaggy8871](/maintainers/shaggy8871)

---

Top Contributors

[![shaggy8871](https://avatars.githubusercontent.com/u/5216660?v=4)](https://github.com/shaggy8871 "shaggy8871 (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shaggy8871-php-rx/health.svg)

```
[![Health](https://phpackages.com/badges/shaggy8871-php-rx/health.svg)](https://phpackages.com/packages/shaggy8871-php-rx)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[drupal/coder

Coder is a library to review Drupal code.

3045.1M535](/packages/drupal-coder)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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