{"id":16423603,"url":"https://github.com/rougin/slytherin","last_synced_at":"2026-04-04T06:39:55.438Z","repository":{"id":13501719,"uuid":"16192517","full_name":"rougin/slytherin","owner":"rougin","description":"Simple, extensible PHP micro-framework.","archived":false,"fork":false,"pushed_at":"2024-11-12T05:51:06.000Z","size":1771,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-27T11:49:10.221Z","etag":null,"topics":["php","php-framework"],"latest_commit_sha":null,"homepage":"https://roug.in/slytherin/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rougin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-01-24T02:18:15.000Z","updated_at":"2024-11-12T05:51:10.000Z","dependencies_parsed_at":"2023-12-13T11:31:35.798Z","dependency_job_id":"ffe71b67-3acd-494c-8146-4c0fc799027a","html_url":"https://github.com/rougin/slytherin","commit_stats":{"total_commits":700,"total_committers":5,"mean_commits":140.0,"dds":"0.13142857142857145","last_synced_commit":"bfa6a9a3c6243c8c9b4bf1d4679a866c46d4f28f"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rougin%2Fslytherin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rougin%2Fslytherin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rougin%2Fslytherin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rougin%2Fslytherin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rougin","download_url":"https://codeload.github.com/rougin/slytherin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822295,"owners_count":20353500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","php-framework"],"created_at":"2024-10-11T07:40:23.739Z","updated_at":"2026-04-04T06:39:55.390Z","avatar_url":"https://github.com/rougin.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slytherin\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]][link-license]\n[![Build Status][ico-build]][link-build]\n[![Coverage Status][ico-coverage]][link-coverage]\n[![Total Downloads][ico-downloads]][link-downloads]\n\nSlytherin 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.\n\n## Background\n\nIn 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.\n\nWith this, Slytherin tries an alternative approach to only require the basic tools like [HTTP][link-wiki-http] and [Routing][link-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.\n\n## Basic Example\n\nBelow is an example code for creating a simple application using Slytherin:\n\n``` php\n// app/web/index.php\n\nuse Rougin\\Slytherin\\Application;\n\n// Load the Composer autoloader ----\n$root = dirname(dirname(__DIR__));\n\nrequire \"$root/vendor/autoload.php\";\n// ---------------------------------\n\n// Create a new application instance ---\n$app = new Application;\n// -------------------------------------\n\n// Create a new HTTP route ---\n$app-\u003eget('/', function ()\n{\n    return 'Hello world!';\n});\n// ---------------------------\n\n// Then run the application after ---\necho $app-\u003erun();\n// ----------------------------------\n```\n\nKindly check the [The First \"Hello World\"][link-wiki-example] page in the wiki for more information in the provided sample code above.\n\n## Upgrade Guide\n\nAs 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][link-wiki-upgrade] page.\n\n## Changelog\n\nPlease see [CHANGELOG][link-changelog] for more information what has changed recently.\n\n## Testing\n\nTo check all written test cases, kindly install the specified third-party packages first:\n\n``` bash\n$ composer request filp/whoops --dev\n$ composer request league/container --dev\n$ composer request nikic/fast-route --dev\n$ composer request phroute/phroute --dev\n$ composer request rdlowrey/auryn --dev\n$ composer request twig/twig --dev\n$ composer request zendframework/zend-diactoros --dev\n$ composer request zendframework/zend-stratigility --dev\n$ composer test\n```\n\n## Credits\n\nSlytherin is inspired by the following packages below and their respective implementations. Their contributions improved [my understanding][link-homepage] of writing frameworks and creating application logic from scratch:\n\n* [Awesome PHP!](https://github.com/ziadoz/awesome-php) by [Jamie York](https://github.com/ziadoz);\n* [Codeigniter](https://codeigniter.com) by [EllisLab](https://ellislab.com)/[British Columbia Institute of Technology](http://www.bcit.ca);\n* [Fucking Small](https://github.com/trq/fucking-small) by [Tony Quilkey](https://github.com/trq);\n* [Laravel](https://laravel.com) by [Taylor Otwell](https://github.com/taylorotwell);\n* [No Framework Tutorial](https://github.com/PatrickLouys/no-framework-tutorial) by [Patrick Louys](https://github.com/PatrickLouys);\n* [PHP Design Patterns](http://designpatternsphp.readthedocs.org/en/latest) by [Dominik Liebler](https://github.com/domnikl);\n* [PHP Standard Recommendations](http://www.php-fig.org/psr) by [PHP-FIG](http://www.php-fig.org);\n* [Symfony](http://symfony.com) by [SensioLabs](https://sensiolabs.com); and\n* All of the [contributors][link-contributors] in this package.\n\n## License\n\nThe MIT License (MIT). Please see [LICENSE][link-license] for more information.\n\n[ico-build]: https://img.shields.io/github/actions/workflow/status/rougin/slytherin/build.yml?style=flat-square\n[ico-coverage]: https://img.shields.io/codecov/c/github/rougin/slytherin?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/rougin/slytherin.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-version]: https://img.shields.io/packagist/v/rougin/slytherin.svg?style=flat-square\n\n[link-build]: https://github.com/rougin/slytherin/actions\n[link-changelog]: https://github.com/rougin/slytherin/blob/master/CHANGELOG.md\n[link-contributors]: https://github.com/rougin/slytherin/contributors\n[link-coverage]: https://app.codecov.io/gh/rougin/slytherin\n[link-downloads]: https://packagist.org/packages/rougin/slytherin\n[link-homepage]: https://roug.in\n[link-license]: https://github.com/rougin/slytherin/blob/master/LICENSE.md\n[link-packagist]: https://packagist.org/packages/rougin/slytherin\n[link-wiki-example]: https://github.com/rougin/slytherin/wiki/The-First-%22Hello-World%22\n[link-wiki-http]: https://github.com/rougin/slytherin/wiki/Http\n[link-wiki-routing]: https://github.com/rougin/slytherin/wiki/Routing\n[link-wiki-upgrade]: https://github.com/rougin/slytherin/wiki/Upgrade-Guide","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frougin%2Fslytherin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frougin%2Fslytherin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frougin%2Fslytherin/lists"}