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(6mo ago)02962MITPHPCI passing

Since May 11Pushed 6mo 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 1mo ago

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

34

—

LowBetter than 77% of packages

Maintenance68

Regular maintenance activity

Popularity11

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

192d ago

Major Versions

0.0.2 → 1.0.02025-10-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/e354fdb316da535dfa8ba2e9193a473c403b6bc6fb9170778d1dc50e304c6e9d?d=identicon)[tourze](/maintainers/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.5k172.9M1.8k](/packages/symfony-security-bundle)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[shopware/storefront

Storefront for Shopware

684.2M148](/packages/shopware-storefront)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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