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

ActiveLibrary[Framework](/categories/framework)

fratily/framework
=================

0.5.0(7y ago)098[1 PRs](https://github.com/fratily/framework/pulls)MITPHPPHP ^7.1

Since Dec 16Pushed 4y agoCompare

[ Source](https://github.com/fratily/framework)[ Packagist](https://packagist.org/packages/fratily/framework)[ RSS](/packages/fratily-framework/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (14)Versions (9)Used By (0)

FratilyPHP
==========

[](#fratilyphp)

Fratily is a web application framework being developed with PHP, for studying.

現状での使い方
=======

[](#現状での使い方)

```
/**
 * Aura DI コンテナ
 */
class DefaultConfig extends Aura\Di\ContainerConfig{

    public function define(Aura\Di\Container $di){
        $di->set(Interop\Http\Factory\ResponseFactoryInterface::class, $di->lazyNew(Fratily\Http\Factory\ResponseFactory::class));
    }
}

/**
 * コントローラークラス
 */
class IndexController extends Fratily\Framework\Controller\Controller{

    public function index(){
        return "This is index page";
    }

    public function page($page){
        return "This is page$page page";
    }
}

/*
 * アクセスログのようなものを出力するミドルウェア
 */
class AccessMiddleware implements Psr\Http\Server\MiddlewareInterface{

    private $dir;

    public function __construct(string $dir){
        if(!is_dir($dir)){
            throw new InvalidArgumentException();
        }

        $this->dir  = realpath($dir);
    }

    public function process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler): \Psr\Http\Message\ResponseInterface{
        $fp = fopen($this->dir . DIRECTORY_SEPARATOR . "log", "a+");

        fwrite($fp, date("Y-m-d H:i:s") . " " . $_SERVER["REQUEST_METHOD"] . "\t" . $_SERVER["REQUEST_URI"] . PHP_EOL);

        return $handler->handle($request);
    }
}

// DIコンテナを生成
$c  = (new Aura\Di\ContainerBuilder)->newConfiguredInstance([
    DefaultConfig::class
]);

// ルート定義
$routes = new Fratily\Router\RouteCollector();

$routes->get("index", "/", [
    "action"    => [IndexController::class, "index"]
]);

$routes->get("page", "/page/{page:[1-9][0-9]*}", [
    "action"    => [IndexController::class, "page"]
]);

$routes->get("func", "/func", [
    "action"    => function(){
        return "This is function page.";
    }
]);

// アプリケーションインスタンスを生成
$app    = new Fratily\Framework\Application($c, $routes, true);
// ミドルウェアを追加
$app->append(new AccessMiddleware(__DIR__));

// リクエストインスタンスを生成
$request    = (new Fratily\Http\Factory\ServerRequestFactory())->createServerRequestFromArray($_SERVER);

// ミドルウェアハンドラを実行
$handler    = $app->generateHandler($request);

// レスポンスを送信
$emitter    = new Fratily\Http\Message\Response\Emitter();
$emitter->emit($handler->handle($request));
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~222 days

Recently: every ~357 days

Total

8

Last Release

1514d ago

Major Versions

0.5.0 → v1.0.x-dev2022-03-23

PHP version history (3 changes)v0.1.0PHP &gt;=7.1

v0.3.0PHP ^7.1

v1.0.x-devPHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c0575d05e23e7ef9b1046a7a922927199c86ef292ebb188758bb214621d7efc?d=identicon)[kento-oka](/maintainers/kento-oka)

---

Top Contributors

[![kento-oka](https://avatars.githubusercontent.com/u/30544668?v=4)](https://github.com/kento-oka "kento-oka (69 commits)")

---

Tags

frameworkFratily

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.3k86.3M2.2k](/packages/symfony-symfony)[laravel/framework

The Laravel Framework.

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

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[slim/slim

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

12.2k49.9M1.3k](/packages/slim-slim)[shopware/platform

The Shopware e-commerce core

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

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

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