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

ActiveLibrary[Framework](/categories/framework)

cicada/cicada
=============

Tiny PHP framework for quickly creating webapps, inspired by Rubys Sinatra

0.5.1(9y ago)77.5k6[2 issues](https://github.com/cicada/cicada/issues)[1 PRs](https://github.com/cicada/cicada/pulls)Apache-2.0PHPPHP &gt;=5.4.0

Since Dec 9Pushed 9y ago2 watchersCompare

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

READMEChangelogDependencies (7)Versions (20)Used By (0)

Cicada
======

[](#cicada)

A micro framework for creating traditional or REST-like web applications.

[![Latest Stable Version](https://camo.githubusercontent.com/13432003258995766c9167ef8df59dc7c6d97f0061177812dd98ade6e845e07d/68747470733a2f2f706f7365722e707567782e6f72672f6369636164612f6369636164612f762f737461626c652e706e67)](https://packagist.org/packages/cicada/cicada) [![Total Downloads](https://camo.githubusercontent.com/9e55abf66cec4da2bd2d2680a8c2c39dd7e1fe463e245bc7e3221fd6c7f6fca0/68747470733a2f2f706f7365722e707567782e6f72672f6369636164612f6369636164612f646f776e6c6f6164732e706e67)](https://packagist.org/packages/cicada/cicada) [![Build Status](https://camo.githubusercontent.com/25f1889cfe4684bff80456c82c0c757a286505e63c651bdf6c7fb43b9ec378fc/68747470733a2f2f7472617669732d63692e6f72672f6369636164612f6369636164612e706e67)](https://travis-ci.org/cicada/cicada) [![Coverage Status](https://camo.githubusercontent.com/472109f3911df4d77791dae579e9a276bcb3755f405332aa4fe4fe4bbfab8996/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6369636164612f6369636164612f62616467652e706e67)](https://coveralls.io/r/cicada/cicada) [![License](https://camo.githubusercontent.com/60a7a3c360c804981b86a94e6380501ce27645ad1ad2714229d05ad59a78760e/68747470733a2f2f706f7365722e707567782e6f72672f6369636164612f6369636164612f6c6963656e73652e706e67)](https://packagist.org/packages/cicada/cicada)

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

[](#installation)

Add Cicada as a requirement for your project via Composer:

```
composer require "cicada/cicada=@stable"

```

Usage
-----

[](#usage)

Minimal application:

```
require '../vendor/autoload.php';

use Cicada\Application;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

$app = new Application();

// Add a route
$app->get('/hello/{name}', function (Application $app, Request $request, $name) {
    return new Response("Hello $name");
});

$app->run();
```

This application has one route which will match GET requests starting with `/hello/` and will forward the matched `{name}` into the callback function as `$name`.

The callback function should return a [Response](http://symfony.com/doc/current/components/http_foundation/introduction.html#response)object. If it returns a string, it will implicitly be converted into a Response.

Handling exceptions
-------------------

[](#handling-exceptions)

It is possible that route callbacks throw an exception. By default, Cicada will in this case return a HTTP 500 response (Internal Server Error). However, it is possible to add exception handlers which will intercept specific exceptions and return an appropriate response.

For example, if you want to catch a custom NotImplementedException and return a custom error message:

```
$app->exception(function (NotImplementedException $ex) {
    $msg = "Dreadfully sorry, old chap, but tis' not implemented yet.";
    return new Response($msg, Response::HTTP_INTERNAL_SERVER_ERROR);
});
```

The callback function passed to `$app->exception()` must have a single argument and that argument must have a class type hint which denotes the exception class which it will handle.

It's possible to specify multiple exception handlers and they will be tried in order in which they were specified:

```
$app->exception(function (SomeException $ex) {
    return new Response("Arrrghhhhh", Response::HTTP_INTERNAL_SERVER_ERROR);
});

$app->exception(function (OtherException $ex) {
    return new Response("FFFFUUUUUUU...", Response::HTTP_INTERNAL_SERVER_ERROR);
});

// If all else fails, this will catch any exceptions
$app->exception(function (Exception $ex) {
    $msg ="Something went wrong. The incident has been logged and our code monkeys are on it.";
    return new Response($msg, Response::HTTP_INTERNAL_SERVER_ERROR);
});
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.2% 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 ~73 days

Recently: every ~233 days

Total

18

Last Release

3294d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/69d0973e79ec870cb60522b5785e3e78e17d4b3569dde896d693b01a381c6f59?d=identicon)[ihabunek](/maintainers/ihabunek)

![](https://www.gravatar.com/avatar/5cc79122958826728ee08076c263ce8f89ccc65f2e8537ab3fb5a9c75b4121c2?d=identicon)[grobmeier](/maintainers/grobmeier)

---

Top Contributors

[![ihabunek](https://avatars.githubusercontent.com/u/482138?v=4)](https://github.com/ihabunek "ihabunek (114 commits)")[![grobmeier](https://avatars.githubusercontent.com/u/873786?v=4)](https://github.com/grobmeier "grobmeier (79 commits)")[![bearzk](https://avatars.githubusercontent.com/u/775611?v=4)](https://github.com/bearzk "bearzk (2 commits)")[![joksnet](https://avatars.githubusercontent.com/u/145141?v=4)](https://github.com/joksnet "joksnet (1 commits)")

---

Tags

framework

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[ccxt/ccxt

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

41.5k328.9k1](/packages/ccxt-ccxt)[contao-community-alliance/dc-general

Universal data container for Contao

1578.3k86](/packages/contao-community-alliance-dc-general)[linio/tortilla

A highly opinionated microframework built with speed and simplicity in mind.

133.0k2](/packages/linio-tortilla)[wpstarter/framework

The WpStarter Framework - Laravel Framework for WordPress

1810.1k4](/packages/wpstarter-framework)

PHPackages © 2026

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