PHPackages                             codamos/tagger - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. codamos/tagger

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

codamos/tagger
==============

A simple tagging library inspired by Go's struct tags

1.0.0(12mo ago)11MITPHPPHP ^8.1

Since Jul 8Pushed 12mo agoCompare

[ Source](https://github.com/codamos-com-br/tagger)[ Packagist](https://packagist.org/packages/codamos/tagger)[ RSS](/packages/codamos-tagger/feed)WikiDiscussions main Synced today

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

codamos/tagger
==============

[](#codamostagger)

  **A simple tagging library inspired by Go's struct tags**

 [![Source Code](https://camo.githubusercontent.com/cb1474e3048f6bcc764a1e06d57a6c9884811be992561a484b529b56432aaccf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d636f64616d6f732f7461676765722d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/codamos-com-br/tagger) [![Download Package](https://camo.githubusercontent.com/89a21ee0a5f83001dcb60f909d2c66bb29efab6019bc395c50b752196fa92885/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f64616d6f732f7461676765722e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://packagist.org/packages/codamos/tagger) [![PHP Programming Language](https://camo.githubusercontent.com/3a3385a282409d2f9b7da140bd907c9e656e61e209561559808d6c282763aa2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f636f64616d6f732f7461676765722e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d253233383839324246)](https://php.net) [![Read License (MIT)](https://camo.githubusercontent.com/a59861d1345f6add342259f394ae916d1b4e5c8b652ea4a56f202517035de3f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f64616d6f732f7461676765722e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d6461726b6379616e)](https://github.com/codamos-com-br/tagger/blob/main/LICENSE)

About
-----

[](#about)

`codamos/tagger` is a simple tagging library inspired by Go's [struct tags](https://go.dev/ref/spec#Struct_types). It allows you to fetch free-form tags from class properties via a `Tag` attribute that can later be used by third-party libraries or your own code.

The library also includes a tag parser and a class tags scanner. These should allow you to use tagger at scale for your entire application at build time, or at runtime.

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

[](#installation)

Install this package as a dependency using [Composer](https://getcomposer.org).

```
composer require codamos/tagger
```

Usage
-----

[](#usage)

You may use the `Tag` attribute to annotate your class' properties with free-form tags, split by space characters.

```
use Codamos\Tagger\Attributes\Tag;
use Codamos\Tagger\Parser\TagParser;
use Codamos\Tagger\Scanner\TagScanner;

class UserDTO
{
    #[Tag('json:"id" orm:"id,primaryKey,autoIncrement"')]}
    public int $id;

    #[Tag('json:"name" orm:"name,notNull,size:255"')]
    public string $name;

    #[Tag('json:"email" orm:"email,notNull,size:255,unique,index"')]
    public string $email;

$parser = new TagParser();
$scanner = new TagScanner($scanner);

$map = $scanner->scan(UserDTO::class);

$emailTags = $map->get('email');
$emailTags->get('json'); // string(json:"email")
$emailTags->get('orm'); // string(orm:"email,notNull,size:255,unique,index")
```

Copyright and License
---------------------

[](#copyright-and-license)

The codamos/tagger library is copyright © [Codamos](https://codamos.com.br)and licensed for use under the terms of the MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance50

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

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

360d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/164b176ce5d3762cc479e0226e7eb85951fb6efc9350496d059b225b94a0a2b5?d=identicon)[nawarian](/maintainers/nawarian)

---

Top Contributors

[![nawarian](https://avatars.githubusercontent.com/u/3905582?v=4)](https://github.com/nawarian "nawarian (8 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/codamos-tagger/health.svg)

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

###  Alternatives

[ramsey/uuid

A PHP library for generating and working with universally unique identifiers (UUIDs).

12.6k745.0M4.0k](/packages/ramsey-uuid)[larswiegers/laravel-maps

A new way to handle maps in your laravel applications.

365138.8k2](/packages/larswiegers-laravel-maps)[terminal42/notification_center

Notification Center extension for Contao Open Source CMS

80413.7k101](/packages/terminal42-notification-center)[doppar/framework

The Doppar Framework

4012.4k14](/packages/doppar-framework)

PHPackages © 2026

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