PHPackages                             switon/router - 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. switon/router

ActiveLibrary[Framework](/categories/framework)

switon/router
=============

Route matching, parameter resolution, and path mapping for Switon Framework

v1.0.0(1mo ago)0225MITPHPPHP &gt;=8.3CI passing

Since May 10Pushed 1mo agoCompare

[ Source](https://github.com/switon-php/router)[ Packagist](https://packagist.org/packages/switon/router)[ Docs](https://github.com/switon-php/router)[ RSS](/packages/switon-router/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (2)Used By (5)

Switon Router Package
=====================

[](#switon-router-package)

Route matching, parameter resolution, and path mapping for Switon Framework.

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

[](#installation)

```
composer require switon/router
```

**Requirements:** PHP 8.3+

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

[](#quick-start)

```
use Switon\Routing\Attribute\GetMapping;
use Switon\Routing\Attribute\PostMapping;
use Switon\Routing\Attribute\RequestMapping;

#[RequestMapping('/user')]
class UserRoutes
{
    #[GetMapping('')]
    public function indexAction(): array
    {
        return ['users' => []];
    }

    #[GetMapping('{id}')]
    public function showAction(int $id): array
    {
        return ['user' => ['id' => $id]];
    }

    #[PostMapping('')]
    public function createAction(): array
    {
        return ['created' => true];
    }
}
```

Docs:

License
-------

[](#license)

MIT.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance94

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

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

31d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc0f20ad15b0ae9fbf9c6e2cd3008692b0c88a877ec8d3e0119211314bf86fc8?d=identicon)[switon](/maintainers/switon)

---

Top Contributors

[![switon-php](https://avatars.githubusercontent.com/u/247358032?v=4)](https://github.com/switon-php "switon-php (8 commits)")

---

Tags

pathsrouterroutingswitonrouterroutingpathsswiton

### Embed Badge

![Health badge](/badges/switon-router/health.svg)

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k86.9M2.2k](/packages/symfony-symfony)[klein/klein

A lightning fast router for PHP

2.7k1.1M31](/packages/klein-klein)[pecee/simple-router

Simple, fast PHP router that is easy to get integrated and in almost any project. Heavily inspired by the Laravel router.

675224.9k18](/packages/pecee-simple-router)[vlucas/bulletphp

A heierarchical resource-oriented micro-framework built on nested closures instead of route-based callbacks

41850.0k1](/packages/vlucas-bulletphp)[izniburak/router

simple router class for php

23423.2k7](/packages/izniburak-router)[vectorface/snappy-router

A quick and snappy routing framework.

4615.2k](/packages/vectorface-snappy-router)

PHPackages © 2026

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