PHPackages                             taknone/attributes - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. taknone/attributes

ActiveLibrary[Queues &amp; Workers](/categories/queues)

taknone/attributes
==================

Attribute-based validation for PHP 8.4+

v2.1.0(4w ago)25773MITPHPPHP &gt;=8.4

Since Sep 17Pushed 4w agoCompare

[ Source](https://github.com/TakNone/Attributes)[ Packagist](https://packagist.org/packages/taknone/attributes)[ RSS](/packages/taknone-attributes/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (3)Versions (5)Used By (3)

Attributes
==========

[](#attributes)

[![PHP Version](https://camo.githubusercontent.com/e2ea012a3d37610a0543f52932a4b335b545adb0a982fa83ce3fec66ad49779e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382532422d626c7565)](https://www.php.net/) [![License: MIT](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)

Attribute-based validation for PHP 8.4+ : validate method parameters, return values and property access using compact, reusable attributes

Validator - Declarative validation using PHP 8+ attributes
==========================================================

[](#validator---declarative-validation-using-php-8-attributes)

A lightweight, framework-agnostic library that lets you declare validation rules as PHP attributes. Validate method parameters, method return values, and property get/set using compact, reusable attribute classes ( for example `#[Range]`, `#[Pattern]`, `#[Vector]` ) Built-in caching of reflection metadata keeps runtime overhead low

---

📦 Installation
==============

[](#-installation)

Install via Composer :

```
composer require taknone/attributes
```

Then enable Composer autoload in your project :

```
require_once __DIR__.'/vendor/autoload.php';
```

---

🚀 Quickstart
============

[](#-quickstart)

The repository includes an [`examples`](examples) directory with runnable examples and small helper scripts

---

Contributing
============

[](#contributing)

PRs welcome ! Follow a few rules :

1. Run and add example for new validators
2. Keep attribute constructor arguments constant expressions ( required by PHP attributes )
3. Document behavior for corner cases ( nullability, casting, unique semantics )

---

License
=======

[](#license)

MIT — see [`LICENSE`](LICENSE)

---

Support / Contact
=================

[](#support--contact)

If you need help integrating `Attributes` into your project, open an issue or reach out via the repository's issue tracker

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance94

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

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 ~88 days

Total

4

Last Release

29d ago

Major Versions

v1.1.0 → v2.0.02026-05-30

PHP version history (2 changes)v1.0.0PHP &gt;=8.3

v2.0.0PHP &gt;=8.4

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

attributeattributescheckerfiltermethodparameterphp84php85propertyreflectionphpasyncvalidationreflectionfilterattributechecker

### Embed Badge

![Health badge](/badges/taknone-attributes/health.svg)

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

###  Alternatives

[amphp/parallel

Parallel processing component for Amp.

85251.9M98](/packages/amphp-parallel)[amphp/socket

Non-blocking socket connection / server implementations based on Amp and Revolt.

26646.6M150](/packages/amphp-socket)[amphp/pipeline

Asynchronous iterators and operators.

7740.0M49](/packages/amphp-pipeline)[amphp/file

Non-blocking access to the filesystem based on Amp and Revolt.

1113.4M129](/packages/amphp-file)[jenner/async-mysql-php

php mysql async client

411.0k](/packages/jenner-async-mysql-php)

PHPackages © 2026

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