PHPackages                             afridlund85/asd-framework - 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. afridlund85/asd-framework

ActiveLibrary[Framework](/categories/framework)

afridlund85/asd-framework
=========================

Minimalistic framework for PHP7

210[1 issues](https://github.com/afridlund85/php7-api-framework/issues)PHP

Since Sep 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/afridlund85/php7-api-framework)[ Packagist](https://packagist.org/packages/afridlund85/asd-framework)[ RSS](/packages/afridlund85-asd-framework/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Asd(name?) PHP7 API Framework [![Build Status](https://camo.githubusercontent.com/eb074eccaab634655d5b528ca6112dd16fb30c50dd1e1360fedefa75d1a9f91a/68747470733a2f2f7472617669732d63692e6f72672f61667269646c756e6438352f706870372d6170692d6672616d65776f726b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/afridlund85/php7-api-framework) [![Coverage Status](https://camo.githubusercontent.com/3e736fff09c7e793a819c8b5823d3414ac1a486d33664357e3c511255a016e9b/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f61667269646c756e6438352f706870372d6170692d6672616d65776f726b2f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/github/afridlund85/php7-api-framework?branch=master)
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#asdname-php7-api-framework--)

PHP7 Framework for API applications.

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

[](#installation)

None, it is not even close to ready for release.

\##Some Key Concepts

- PHP 7 only
- No dependencies(expect PSR-7 interfaces)
- PSR: 1,2,4,7
- No statics, no globals
- No forced strict conventions in naming/routing, folder structure etc when using
- No settings or configs
- Transparency, no unncessary abstraction/wrapping
- Use PHP 7 strict types, (except PSR-7 classes, cuz they're not PHP 7)

Intended usage
--------------

[](#intended-usage)

Presumptions: htaccess configured and PSR-4 autoloading

Define routes with HTTP-method, path and controllerclass + method

**index.php**

```
require_once('vendor/autoload.php');

use Asd\Asd;
use Asd\Router\Route;
use Asd\FunctionCallback;
use Asd\MethodCallback;

$app = new Asd();

//Controller class extending from Asd\Controller and has dependency to Asd\Session
$app->addRoute(new Route('GET', '/', new MethodCallback('MyApp\Controllers', 'Welcome', 'start')));

//Just some class with a method
$app->addRoute(new Route('GET', 'about', new MethodCallback('MyApp', 'SomeClass', 'about')));

//Closure/Anonymus function
$app->addRoute(new Route('post', 'blog', new FunctionCallback(function($req, $res){
  //do stuff
  return $this->res; //return response
})));

//Closure/anonymus function with dependency
$app->addRoute(new Route('post', 'auth', new FunctionCallback(function($req, $res, Asd\Session $session){
  //session class automatically injected through DI
  return $this->res;//return response
})));

$app->run();

```

**MyApp/Controllers/Welcome.php**

```
namespace MyApp\controllers;

use Asd\Controller;

class Welcome extends Controller
{
  public function __construct(Asd\Session $session)
  {
    //session class automatically injected through DI
  }
  public function start($req, $res)
  {
    return $res->withJsonResponse('Hello!');
  }
}

```

**MyApp/SomeClass.php**

```
namespace MyApp;

class SomeClass
{
  public function about($req, $res)
  {
    //do stuff;
    return $res;
  }
}

```

Setup Development environment
-----------------------------

[](#setup-development-environment)

*Requires PHP7*

```
git clone https://github.com/afridlund85/php7-api-framework.git
cd php7-api-framework
composer install

```

### Tests

[](#tests)

Three levels of testing, unit, integration and system.

#### Runing tests

[](#runing-tests)

**Run all test suites**

```
composer test

```

**Run Unit test suite**

```
composer unit

```

**Run Integration test suite**

```
composer integration

```

**Run System test suite**

```
composer system

```

### PSR-2 linting

[](#psr-2-linting)

**Check for PSR-2 errors**

```
composer sniff

```

### Code coverage

[](#code-coverage)

**Generate code coverage**

```
composer coverage

```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.7% 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.

### Community

Maintainers

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

---

Top Contributors

[![afrxx09](https://avatars.githubusercontent.com/u/5367547?v=4)](https://github.com/afrxx09 "afrxx09 (228 commits)")[![afridlund85](https://avatars.githubusercontent.com/u/15079166?v=4)](https://github.com/afridlund85 "afridlund85 (18 commits)")

### Embed Badge

![Health badge](/badges/afridlund85-asd-framework/health.svg)

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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