PHPackages                             millken/ypf - 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. millken/ypf

ActiveLibrary[Framework](/categories/framework)

millken/ypf
===========

PHP framework &amp; Application Server.

3.1.2(5y ago)73035[1 PRs](https://github.com/millken/ypf/pulls)Apache-2.0PHPPHP &gt;=7.2.0

Since Apr 14Pushed 3y ago2 watchersCompare

[ Source](https://github.com/millken/ypf)[ Packagist](https://packagist.org/packages/millken/ypf)[ Docs](https://github.com/millken/ypf/)[ RSS](/packages/millken-ypf/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (8)Versions (25)Used By (0)

ypf framework
=============

[](#ypf-framework)

Overview
--------

[](#overview)

A micro php7 framework. in swoole mode, 10x performance can be improved.

The framework is mainly for the use of senior PHP programmers, keep everything under control.

Supports and uses various PSRs:

- PSR-2 (Coding Standard)
- PSR-4 (Autoloading)
- PSR-7 (HTTP Message)
- PSR-11 (Container Interface)
- PSR-15 (HTTP Middleware)

Installion
----------

[](#installion)

```
composer require millken/ypf
```

Requirements
------------

[](#requirements)

1. PHP 7.2+
2. Swoole 4.2+ (Optional but recommended)

Usage
-----

[](#usage)

> php swoole.php

```
//swoole.php

require './vendor/autoload.php';
use GuzzleHttp\Psr7\Response;

$router = new Ypf\Route\Router();
$router->map('GET', '/', function ($request) {
    return 'test';
});
$router->map('GET', '/hello/{name}?', function ($request) {
    $name = ucwords($request->getAttribute('name', 'World!'));

    return new Response(200, [], 'hello '.$name);
});

$services = [
    'factory' => Ypf\Application\Swoole::class,

    'swoole' => [
        'server' => [
            'address' => '127.0.0.1',
            'port' => 7000,
        ],
        'options' => [
            'dispatch_mode' => 1,
        ],
    ],
    'middleware' => [
        new Ypf\Route\Middleware($router),
    ],
];

$app = new Ypf\Application($services);

$app->run();
```

swoole performance

```
 wrk -t 20 -c 200 -d 30s "http://127.0.0.1:7000/"
Running 30s test @ http://127.0.0.1:7000/
  20 threads and 200 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     2.16ms    1.94ms  40.97ms   88.56%
    Req/Sec     5.50k   521.94    19.49k    86.64%
  3289431 requests in 30.10s, 501.93MB read
Requests/sec: 109285.69
Transfer/sec:     16.68MB
```

> php -S 127.0.0.1:7000 cgi.php #cgi mode

```
//cgi.php

require './vendor/autoload.php';
use GuzzleHttp\Psr7\Response;

$router = new Ypf\Route\Router();
$router->map('GET', '/', function ($request) {
    return 'test';
});
$router->map('GET', '/hello/{name}?', function ($request) {
    $name = ucwords($request->getAttribute('name', 'World!'));

    return new Response(200, [], 'hello '.$name);
});

$services = [
    'middleware' => [
        new Ypf\Route\Middleware($router),
    ],
];

$app = new Ypf\Application($services);

$app->run();
```

See the full [example](https://github.com/millken/ypf_demo)

License
-------

[](#license)

[Apache License, Version 2.0](https://github.com/millken/ypf/blob/master/license.txt)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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 ~82 days

Recently: every ~96 days

Total

22

Last Release

1955d ago

Major Versions

1.2.1 → 2.0.02018-08-01

2.0.1 → 3.0.02018-09-18

PHP version history (3 changes)1.0.0PHP &gt;=5.3.0

1.2.1PHP &gt;=7.0.0

2.0.0PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/45d31d24e1da038177a161d68296de2e36426a4d5b018efd491500d91c147921?d=identicon)[millken](/maintainers/millken)

---

Top Contributors

[![millken](https://avatars.githubusercontent.com/u/176581?v=4)](https://github.com/millken "millken (167 commits)")

---

Tags

frameworklibraryswoolewebserver

### Embed Badge

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

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

###  Alternatives

[cakephp/cakephp

The CakePHP framework

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

The Laravel Framework.

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

The Symfony PHP framework

31.3k86.3M2.2k](/packages/symfony-symfony)[shopware/platform

The Shopware e-commerce core

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

Flow Application Framework

862.0M451](/packages/neos-flow)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)

PHPackages © 2026

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