PHPackages                             tourze/user-tag-contracts - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. tourze/user-tag-contracts

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

tourze/user-tag-contracts
=========================

用户标签

1.0.0(8mo ago)03032MITPHPCI passing

Since May 11Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/tourze/user-tag-contracts)[ Packagist](https://packagist.org/packages/tourze/user-tag-contracts)[ RSS](/packages/tourze-user-tag-contracts/feed)WikiDiscussions master Synced today

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

User Tag Contracts
==================

[](#user-tag-contracts)

[English](README.md) | [中文](README.zh-CN.md)

This package provides contracts (interfaces) for user tag systems in Symfony applications.

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

[](#installation)

```
composer require tourze/user-tag-contracts
```

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

[](#quick-start)

This package provides two main interfaces:

### TagInterface

[](#taginterface)

Represents a tag that can be associated with users:

```
use Tourze\UserTagContracts\TagInterface;

class UserTag implements TagInterface
{
    private string $name;

    public function __construct(string $name)
    {
        $this->name = $name;
    }

    public function getName(): string
    {
        return $this->name;
    }
}
```

### TagLoaderInterface

[](#tagloaderinterface)

Provides tag loading functionality for users:

```
use Tourze\UserTagContracts\TagLoaderInterface;
use Symfony\Component\Security\Core\User\UserInterface;

class DatabaseTagLoader implements TagLoaderInterface
{
    public function loadTagsByUser(UserInterface $user): iterable
    {
        // Load tags from database
        return $this->repository->findTagsByUser($user);
    }
}
```

Features
--------

[](#features)

- Simple and extensible tag interface
- Automatic service configuration with Symfony's dependency injection
- Support for any user implementation that implements `UserInterface`
- Lazy loading support through iterables

Usage
-----

[](#usage)

Services implementing `TagLoaderInterface` are automatically tagged with `user-tag.service` in the Symfony container, making them easy to discover and use.

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

[](#requirements)

- PHP 8.1+
- Symfony 6.4+

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance61

Regular maintenance activity

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Total

3

Last Release

246d ago

Major Versions

0.0.2 → 1.0.02025-10-31

### Community

Maintainers

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

---

Top Contributors

[![tourze](https://avatars.githubusercontent.com/u/13899502?v=4)](https://github.com/tourze "tourze (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourze-user-tag-contracts/health.svg)

```
[![Health](https://phpackages.com/badges/tourze-user-tag-contracts/health.svg)](https://phpackages.com/packages/tourze-user-tag-contracts)
```

###  Alternatives

[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k185.6M2.4k](/packages/symfony-security-bundle)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

515100.5k3](/packages/web-auth-webauthn-framework)[shopware/storefront

Storefront for Shopware

684.6M236](/packages/shopware-storefront)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[web-auth/webauthn-symfony-bundle

FIDO2/Webauthn Security Bundle For Symfony

66529.9k11](/packages/web-auth-webauthn-symfony-bundle)

PHPackages © 2026

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