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

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

ft/attributes
=============

Catalog of PHP attributes like json, logging and property validation

2.2.2(3y ago)0331MITPHP

Since Dec 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/soulshined/ft-attributes)[ Packagist](https://packagist.org/packages/ft/attributes)[ RSS](/packages/ft-attributes/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (8)Used By (1)

A catalog of php attributes for flexible and maintainable modeling.

Attributes for logging, json, property validation and more.

Quick example of property validation:

```
final class MyClass {
    use PropertyValidator;

    #[Email]
    private string $email;

    #[Min(value: 12)]
    private int $age;

    #[Size(min: 1, max: 3)]
    private array $phone_numbers;
}
```

Quick example of json:

```
class MyClass {
    private int $id = 1;
    #[JsonIgnore]
    private string $ssn = "xxx-xx-xxxx";
}

Json::encode(new MyClass); // { "id" : 1 }
```

For complete documentation and attribute usages see the [documentation wiki](https://github.com/soulshined/ft-attributes/wiki/Documentation)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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

Total

7

Last Release

1188d ago

Major Versions

1.1 → 2.02022-12-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a9ec50a967899163d0d22508c6e3b72b930f51e2d36213ac0bc782910ad46a2?d=identicon)[davidfreer](/maintainers/davidfreer)

---

Top Contributors

[![soulshined](https://avatars.githubusercontent.com/u/11242654?v=4)](https://github.com/soulshined "soulshined (18 commits)")

---

Tags

phpjsonvalidationtraitserializationencodedecodedeserializationattribute

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[evaisse/php-json-schema-generator

A JSON Schema Generator.

20298.5k1](/packages/evaisse-php-json-schema-generator)[yorcreative/laravel-argonaut-dto

Argonaut is a lightweight Data Transfer Object (DTO) package for Laravel that supports nested casting, recursive serialization, and validation out of the box. Ideal for service layers, APIs, and clean architecture workflows.

1062.8k1](/packages/yorcreative-laravel-argonaut-dto)[fab2s/dt0

Immutable DTOs with bidirectional casting. No framework required. 8x faster than the alternative.

101.6k1](/packages/fab2s-dt0)

PHPackages © 2026

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