PHPackages                             mitsuki/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. [Framework](/categories/framework)
4. /
5. mitsuki/attributes

ActiveLibrary[Framework](/categories/framework)

mitsuki/attributes
==================

A lightweight and high-performance PHP router for the Mitsuki framework, leveraging Symfony Routing components for robust URL management.

v1.0.0(2mo ago)1132MITPHP

Since Feb 20Pushed 2mo agoCompare

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

READMEChangelogDependenciesVersions (2)Used By (2)

Mitsuki Attributes
==================

[](#mitsuki-attributes)

**Lightweight PHP 8 Metadata library for the Mitsuki Framework.**

This package provides a set of native PHP 8 Attributes to define routing and controller configurations. By separating attributes into this standalone library, your application stays decoupled, and your domain logic remains clean.

---

✨ Features
----------

[](#-features)

- **Zero Dependencies**: Extremely light footprint with no external requirements.
- **PHP 8+ Native**: Leveraging the power of native attributes (no more DocBlock annotations).
- **Highly Decoupled**: Can be used in any project that needs a standardized way to mark controllers and routes.
- **Strictly Typed**: Fully compatible with static analysis tools like PHPStan or Psalm.

---

🚀 Installation
--------------

[](#-installation)

You can install the package via Composer:

```
composer require mitsuki/attributes
```

---

🛠 Usage
-------

[](#-usage)

This library provides two main attributes to decorate your classes and methods.

### 1. The `Controller` Attribute

[](#1-the-controller-attribute)

Used at the **class level** to define a base prefix for all routes within that controller.

```
use Mitsuki\Attributes\Controller;

#[Controller(baseUri: '/api/v1')]
class UserController
{
    // ...
}
```

### 2. The `Route` Attribute

[](#2-the-route-attribute)

Used at the **method level** to define the specific path, name, and allowed HTTP methods.

```
use Mitsuki\Attributes\Route;

class UserController
{
    #[Route(name: 'user_show', path: '/user/{id}', methods: ['GET'])]
    public function show(int $id)
    {
        // Your logic here...
    }
}
```

---

🏗 Architecture
--------------

[](#-architecture)

The Attributes act as a bridge between your code and the **Mitsuki Router**.

1. **Definition**: You decorate your code with `#[Route]`.
2. **Reflection**: The Mitsuki Router/Controller-Resolver reads these attributes using PHP's `ReflectionClass`.
3. **Execution**: The framework configures the routing table based on this metadata.

---

📝 API Reference
---------------

[](#-api-reference)

### `Mitsuki\Attributes\Controller`

[](#mitsukiattributescontroller)

ParameterTypeDescription`$baseUri``string`The prefix for all routes in the class.### `Mitsuki\Attributes\Route`

[](#mitsukiattributesroute)

ParameterTypeDescription`$name``string`Unique identifier for the route.`$path``string`The URL pattern.`$methods``arraystring`---

🤝 Contributing
--------------

[](#-contributing)

If you want to add new attributes to the Mitsuki ecosystem:

1. Fork the repository.
2. Create your attribute class.
3. Submit a Pull Request.

---

📄 License
---------

[](#-license)

This project is licensed under the MIT License - see the [LICENSE](https://www.google.com/search?q=LICENSE) file for details.

\*\*Maintained by [Zgenius Matondo\*\*](https://github.com/zgeniuscoders)

---

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance83

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity34

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

Unknown

Total

1

Last Release

88d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59ea5d2ce29d5426a3d7feabbcc7b07772b03dd80e4cd13afd6f9ac5e0469998?d=identicon)[zgenius](/maintainers/zgenius)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

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