PHPackages                             slim/slim - 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. slim/slim

ActiveLibrary[Framework](/categories/framework)

slim/slim
=========

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs

4.15.1(5mo ago)12.2k49.9M—2.2%2.0k[10 issues](https://github.com/slimphp/Slim/issues)[4 PRs](https://github.com/slimphp/Slim/pulls)20MITPHPPHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Apr 14Pushed 1mo ago481 watchersCompare

[ Source](https://github.com/slimphp/Slim)[ Packagist](https://packagist.org/packages/slim/slim)[ Docs](https://www.slimframework.com)[ Fund](https://opencollective.com/slimphp)[ Fund](https://tidelift.com/funding/github/packagist/slim/slim)[ RSS](/packages/slim-slim/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelog (10)Dependencies (22)Versions (83)Used By (20)Security (1)

Slim Framework
==============

[](#slim-framework)

[![Build Status](https://github.com/slimphp/Slim/actions/workflows/tests.yml/badge.svg?branch=4.x)](https://github.com/slimphp/Slim/actions/workflows/tests.yml?query=branch:4.x)[![Coverage Status](https://camo.githubusercontent.com/7f718f3838e7f403579b17fdce4b21cf90b698d24384681fb142cfc36961dd57/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f736c696d7068702f536c696d2f62616467652e7376673f6272616e63683d342e78)](https://coveralls.io/github/slimphp/Slim?branch=4.x)[![Total Downloads](https://camo.githubusercontent.com/98d2992f515424b8457d95383125687be0b490ca6cc8e0ae288688b78d457222/68747470733a2f2f706f7365722e707567782e6f72672f736c696d2f736c696d2f646f776e6c6f616473)](https://packagist.org/packages/slim/slim)[![License](https://camo.githubusercontent.com/0667d4e34e0e8724f9b8fd245e59605f39c803cad537b8042ac9dfca46714880/68747470733a2f2f706f7365722e707567782e6f72672f736c696d2f736c696d2f6c6963656e7365)](https://packagist.org/packages/slim/slim)

Slim is a PHP micro-framework that helps you quickly write simple yet powerful web applications and APIs.

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

[](#installation)

It's recommended that you use [Composer](https://getcomposer.org/) to install Slim.

```
$ composer require slim/slim
```

This will install Slim and all required dependencies. Slim requires PHP 7.4 or newer.

Choose a PSR-7 Implementation &amp; ServerRequest Creator
---------------------------------------------------------

[](#choose-a-psr-7-implementation--serverrequest-creator)

Before you can get up and running with Slim you will need to choose a PSR-7 implementation that best fits your application. A few notable ones:

- [Slim-Psr7](https://github.com/slimphp/Slim-Psr7) - This is the Slim Framework PSR-7 implementation
- [httpsoft/http-message](https://github.com/httpsoft/http-message) &amp; [httpsoft/http-server-request](https://github.com/httpsoft/http-server-request) - This is the fastest, strictest and most lightweight implementation available
- [Nyholm/psr7](https://github.com/Nyholm/psr7) &amp; [Nyholm/psr7-server](https://github.com/Nyholm/psr7-server) - Performance is almost the same as the HttpSoft implementation
- [Guzzle/psr7](https://github.com/guzzle/psr7) - This is the implementation used by the Guzzle Client, featuring extra functionality for stream and file handling
- [laminas-diactoros](https://github.com/laminas/laminas-diactoros) - This is the Laminas (Zend) PSR-7 implementation

Slim-Http Decorators
--------------------

[](#slim-http-decorators)

[Slim-Http](https://github.com/slimphp/Slim-Http) is a set of decorators for any PSR-7 implementation that we recommend is used with Slim Framework. To install the Slim-Http library simply run the following command:

```
composer require slim/http
```

The `ServerRequest` and `Response` object decorators are automatically detected and applied by the internal factories. If you have installed Slim-Http and wish to turn off automatic object decoration then you can use the following statements:

```
