PHPackages                             rougin/slytherin - 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. rougin/slytherin

ActiveLibrary[Framework](/categories/framework)

rougin/slytherin
================

A simple and extensible PHP micro-framework.

v0.9.8(2y ago)1114.8k47MITPHPPHP &gt;=5.3.0CI passing

Since Jun 17Pushed 4w ago4 watchersCompare

[ Source](https://github.com/rougin/slytherin)[ Packagist](https://packagist.org/packages/rougin/slytherin)[ Docs](https://roug.in/slytherin/)[ RSS](/packages/rougin-slytherin/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (4)Versions (34)Used By (7)

Slytherin
=========

[](#slytherin)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d81a63dff1d3b71cde3e007d75b6f84cd884c6dbad558e24c2c1f77a459a21c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f7567696e2f736c7974686572696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rougin/slytherin)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/rougin/slytherin/blob/master/LICENSE.md)[![Build Status](https://camo.githubusercontent.com/1e3403de4273a4516c25d73fa99a3e3cf3b692e78bf08f81a512be981126f12d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f726f7567696e2f736c7974686572696e2f6275696c642e796d6c3f7374796c653d666c61742d737175617265)](https://github.com/rougin/slytherin/actions)[![Coverage Status](https://camo.githubusercontent.com/3aa832091081059effaf0164ab327bb66bcf82d0dcf73a2d4d279aa12d42b565/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f726f7567696e2f736c7974686572696e3f7374796c653d666c61742d737175617265)](https://app.codecov.io/gh/rougin/slytherin)[![Total Downloads](https://camo.githubusercontent.com/c5d3b8f95b373096b0bce86294ac6ecb1344db833ac4298156bd923c4f3d1b2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f7567696e2f736c7974686572696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rougin/slytherin)

Slytherin is a simple and extensible PHP micro-framework that tries to achieve a [SOLID-based design](https://en.wikipedia.org/wiki/SOLID) for creating web applications. It uses [Composer](https://getcomposer.org/) as the dependency package manager to add, update or even remove external packages.

Background
----------

[](#background)

In the current state of PHP ecosystem, the mostly used PHP frameworks like [Symfony](http://symfony.com) and [Laravel](https://laravel.com) provide a great set of tools for every PHP software engineer. While the said PHP frameworks provide a kitchen-sink solution for every need (e.g., content management system (CMS), CRUD, etc.), they are sometimes overkill, overwhelming at first, or sometimes uses a strict directory structure.

With this, Slytherin tries an alternative approach to only require the basic tools like [HTTP](https://github.com/rougin/slytherin/wiki/Http) and [Routing](https://github.com/rougin/slytherin/wiki/Routing) and let the application evolve from a simple API tool to a full-featured web application. With no defined directory structure, Slytherin can be used to mix and match any structure based on the application's requirements and to encourage the use of open-source packages in the PHP ecosystem.

Basic Example
-------------

[](#basic-example)

Below is an example code for creating a simple application using Slytherin:

```
// app/web/index.php

use Rougin\Slytherin\Application;

// Load the Composer autoloader ----
$root = dirname(dirname(__DIR__));

require "$root/vendor/autoload.php";
// ---------------------------------

// Create a new application instance ---
$app = new Application;
// -------------------------------------

// Create a new HTTP route ---
$app->get('/', function ()
{
    return 'Hello world!';
});
// ---------------------------

// Then run the application after ---
echo $app->run();
// ----------------------------------
```

Kindly check the [The First "Hello World"](https://github.com/rougin/slytherin/wiki/The-First-%22Hello-World%22) page in the wiki for more information in the provided sample code above.

Upgrade Guide
-------------

[](#upgrade-guide)

As Slytherin is evolving as a micro-framework, there might be some breaking changes in its internal code during development. The said changes can be found in the [Upgrade Guide](https://github.com/rougin/slytherin/wiki/Upgrade-Guide) page.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](https://github.com/rougin/slytherin/blob/master/CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

To check all written test cases, kindly install the specified third-party packages first:

```
$ composer require filp/whoops --dev
$ composer require league/container --dev
$ composer require nikic/fast-route --dev
$ composer require phroute/phroute --dev
$ composer require rdlowrey/auryn --dev
$ composer require twig/twig --dev
$ composer require zendframework/zend-diactoros --dev
$ composer require zendframework/zend-stratigility --dev
$ composer test
```

Credits
-------

[](#credits)

Slytherin is inspired by the following packages below and their respective implementations. Their contributions improved [my understanding](https://roug.in) of writing frameworks and creating application logic from scratch:

- [Awesome PHP!](https://github.com/ziadoz/awesome-php) by [Jamie York](https://github.com/ziadoz);
- [Codeigniter](https://codeigniter.com) by [EllisLab](https://ellislab.com)/[British Columbia Institute of Technology](http://www.bcit.ca);
- [Fucking Small](https://github.com/trq/fucking-small) by [Tony Quilkey](https://github.com/trq);
- [Laravel](https://laravel.com) by [Taylor Otwell](https://github.com/taylorotwell);
- [No Framework Tutorial](https://github.com/PatrickLouys/no-framework-tutorial) by [Patrick Louys](https://github.com/PatrickLouys);
- [PHP Design Patterns](http://designpatternsphp.readthedocs.org/en/latest) by [Dominik Liebler](https://github.com/domnikl);
- [PHP Standard Recommendations](http://www.php-fig.org/psr) by [PHP-FIG](http://www.php-fig.org);
- [Symfony](http://symfony.com) by [SensioLabs](https://sensiolabs.com); and
- All of the [contributors](https://github.com/rougin/slytherin/contributors) in this package.

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](https://github.com/rougin/slytherin/blob/master/LICENSE.md) for more information.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance62

Regular maintenance activity

Popularity34

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.9% 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 ~102 days

Recently: every ~40 days

Total

33

Last Release

772d ago

PHP version history (2 changes)v0.1.0PHP &gt;=5.3.0

v0.5.0PHP &gt;=5.4.0

### Community

Maintainers

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

---

Top Contributors

[![rougin](https://avatars.githubusercontent.com/u/6078637?v=4)](https://github.com/rougin "rougin (864 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

phpphp-frameworkphp frameworkphp-packagephp micro framework

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rougin-slytherin/health.svg)

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[cakephp/cakephp

The CakePHP framework

8.9k19.5M1.8k](/packages/cakephp-cakephp)[bref/bref

Bref is a framework to write and deploy serverless PHP applications on AWS Lambda.

3.4k10.6M67](/packages/bref-bref)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

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