{"id":30390103,"url":"https://github.com/yii2-extensions/franken-php","last_synced_at":"2026-01-28T01:20:23.832Z","repository":{"id":308046312,"uuid":"1031393416","full_name":"yii2-extensions/franken-php","owner":"yii2-extensions","description":"Supercharge your Yii2 applications with FrankenPHP blazing-fast HTTP server.","archived":false,"fork":false,"pushed_at":"2025-12-03T14:59:24.000Z","size":98,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-06T19:29:41.956Z","etag":null,"topics":["frankenphp","psr-7","worker","yii2","yii2-extensions"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yii2-extensions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["terabytesoftw"]}},"created_at":"2025-08-03T16:39:17.000Z","updated_at":"2025-12-04T14:48:17.000Z","dependencies_parsed_at":"2025-08-03T21:11:30.444Z","dependency_job_id":"97a62ee6-0415-462d-8b3a-fc1268f0db5c","html_url":"https://github.com/yii2-extensions/franken-php","commit_stats":null,"previous_names":["yii2-extensions/franken-php"],"tags_count":2,"template":false,"template_full_name":"yii2-extensions/template","purl":"pkg:github/yii2-extensions/franken-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yii2-extensions%2Ffranken-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yii2-extensions%2Ffranken-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yii2-extensions%2Ffranken-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yii2-extensions%2Ffranken-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yii2-extensions","download_url":"https://codeload.github.com/yii2-extensions/franken-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yii2-extensions%2Ffranken-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28757908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T20:20:48.599Z","status":"ssl_error","status_checked_at":"2026-01-25T20:20:31.796Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frankenphp","psr-7","worker","yii2","yii2-extensions"],"created_at":"2025-08-21T09:35:21.906Z","updated_at":"2026-01-25T20:25:52.823Z","avatar_url":"https://github.com/yii2-extensions.png","language":"PHP","funding_links":["https://github.com/sponsors/terabytesoftw"],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD041 --\u003e\n\u003cp align=\"center\"\u003e\n    \u003cpicture\u003e\n        \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://www.yiiframework.com/image/design/logo/yii3_full_for_dark.svg\"\u003e\n        \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://www.yiiframework.com/image/design/logo/yii3_full_for_light.svg\"\u003e\n        \u003cimg src=\"https://www.yiiframework.com/image/design/logo/yii3_full_for_dark.svg\" alt=\"Yii Framework\" width=\"80%\"\u003e\n    \u003c/picture\u003e\n    \u003ch1 align=\"center\"\u003eFrankenPHP\u003c/h1\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\u003c!-- markdownlint-enable MD041 --\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/yii2-extensions/franken-php/actions/workflows/build.yml\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/yii2-extensions/franken-php/build.yml?style=for-the-badge\u0026logo=github\u0026label=PHPUnit\" alt=\"PHPUnit\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://dashboard.stryker-mutator.io/reports/github.com/yii2-extensions/franken-php/main\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/endpoint?style=for-the-badge\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyii2-extensions%2Ffranken-php%2Fmain\" alt=\"Mutation Testing\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/yii2-extensions/franken-php/actions/workflows/static.yml\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/yii2-extensions/franken-php/static.yml?style=for-the-badge\u0026logo=github\u0026label=PHPStan\" alt=\"PHPStan\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003eSupercharge your Yii2 applications with FrankenPHP blazing-fast HTTP server\u003c/strong\u003e\u003cbr\u003e\n    \u003cem\u003eHTTP/2, HTTP/3, automatic memory management, and worker mode for ultimate performance\u003c/em\u003e\n\u003c/p\u003e\n\n## Features\n\n\u003cpicture\u003e\n    \u003csource media=\"(min-width: 768px)\" srcset=\"./docs/svgs/features.svg\"\u003e\n    \u003cimg src=\"./docs/svgs/features-mobile.svg\" alt=\"Feature Overview\" style=\"width: 100%;\"\u003e\n\u003c/picture\u003e\n\n## Demo\n\n[![Template](https://img.shields.io/badge/Template-App%20Basic-74AA9C?style=for-the-badge\u0026logo=yii\u0026logoColor=white)](https://github.com/yii2-extensions/app-basic/tree/franken-php)\n\nExplore the ready-to-run Yii2 + FrankenPHP application template.\n\n### Installation\n\n```bash\ncomposer require yii2-extensions/franken-php:^0.1.0@dev\n```\n\n### Quick start\n\nCreate your FrankenPHP entry point (`web/index.php`)\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\n// disable PHP automatic session cookie handling\nini_set('session.use_cookies', '0');\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\nuse yii2\\extensions\\frankenphp\\FrankenPHP;\nuse yii2\\extensions\\psrbridge\\http\\StatelessApplication;\n\n// Load environment variables from .env file\n$dotenv = Dotenv\\Dotenv::createImmutable(dirname(__DIR__));\n$dotenv-\u003esafeLoad();\n\n// production default (change to 'true' for development)\ndefine('YII_DEBUG', $_ENV['YII_DEBUG'] ?? false);\n// production default (change to 'dev' for development)\ndefine('YII_ENV', $_ENV['YII_ENV'] ?? 'prod');\n\nrequire_once dirname(__DIR__) . '/vendor/yiisoft/yii2/Yii.php';\n\n$config = require_once dirname(__DIR__) . '/config/web.php';\n\n$runner = new FrankenPHP(new StatelessApplication($config));\n\n$runner-\u003erun();\n```\n\n### FrankenPHP configuration\n\nCreate `Caddyfile` in your project root (worker mode)\n\n```caddyfile\n{\n    auto_https off\n    admin localhost:2019\n    https_port 8443\n\n    frankenphp {\n        worker ./web/index.php\n    }\n}\n\nlocalhost {\n    tls ./web/ssl/localhost.pem ./web/ssl/localhost-key.pem\n\n    log\n\n    encode zstd br gzip\n\n    root ./web\n\n    # compatibility headers to enable X-Sendfile support in PHP frameworks (Yii2/Symfony)\n    # see: https://github.com/php/frankenphp/blob/main/docs/x-sendfile.md\n    request_header X-Sendfile-Type x-accel-redirect\n    request_header X-Accel-Mapping ../private-files=/private-files\n\n    intercept {\n        @sendfile header X-Accel-Redirect *\n        handle_response @sendfile {\n            root private-files/\n            rewrite * {resp.header.X-Accel-Redirect}\n            method * GET\n            header -X-Accel-Redirect\n            file_server\n        }\n    }\n\n    php_server {\n        try_files {path} index.php\n    }\n}\n```\n\n\u003e [!WARNING]\n\u003e **Note:** Using custom certificates (like `tls ./web/ssl/localhost.pem ./web/ssl/localhost-key.pem`) avoids browser trust warnings that occur with Caddy's automatic self-signed certificates.  \n\u003e For local development, consider using [mkcert](https://github.com/FiloSottile/mkcert) to generate trusted local certificates.  \n\u003e If you want to use Caddy's automatic self-signed certificates for local development, you can remove this line.\n\n### Standalone Binary\n\nWe provide static FrankenPHP binaries for Linux and macOS containing [PHP 8.4](https://www.php.net/releases/8.4/en.php)\nand most popular PHP extensions.\n\nOn Windows, use [WSL](https://learn.microsoft.com/windows/wsl/) to run FrankenPHP.\n\n[Download FrankenPHP](https://github.com/php/frankenphp/releases) or copy this line into your terminal to automatically\ninstall the version appropriate for your platform.\n\n```bash\ncurl https://frankenphp.dev/install.sh | sh\nmv frankenphp /usr/local/bin/\n```\n\nTo run your application, you can use the following command.\n\n```bash\n./frankenphp run --config ./Caddyfile --watch\n```\n\n### Docker\n\nAlternatively, [Docker images](https://frankenphp.dev/docs/docker/) are available.\n\n#### Worker mode\n\nGitbash/Windows\n\n\u003c!-- editorconfig-checker-disable --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n```bash\ndocker run \\\n  -e CADDY_GLOBAL_OPTIONS=\"auto_https off\" \\\n  -e CADDY_SERVER_EXTRA_DIRECTIVES=\"tls /app/web/ssl/localhost.pem /app/web/ssl/localhost-key.pem\" \\\n  -e FRANKENPHP_CONFIG=\"worker ./web/index.php\" \\\n  -e SERVER_NAME=\"https://localhost:8443\" \\\n  -e SERVER_ROOT=\"./web\" \\\n  -v \"//k/yii2-extensions/app-basic:/app\" \\\n  -p 8443:8443 \\\n  -p 8443:8443/udp \\\n  --name yii2-frankenphp-worker \\\n  dunglas/frankenphp\n```\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- editorconfig-checker-enable --\u003e\n\n\u003e **Note:** Paths in the example (`//k/yii2-extensions/app-basic`) are for demonstration purposes only.  \n\u003e Replace them with the actual path to your Yii2 project on your system.\n\nLinux/WSL\n\n\u003c!-- editorconfig-checker-disable --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n```bash\ndocker run \\\n  -e CADDY_GLOBAL_OPTIONS=\"auto_https off\" \\\n  -e CADDY_SERVER_EXTRA_DIRECTIVES=\"tls /app/web/ssl/localhost.pem /app/web/ssl/localhost-key.pem\" \\\n  -e FRANKENPHP_CONFIG=\"worker ./web/index.php\" \\\n  -e SERVER_NAME=\"https://localhost:8443\" \\\n  -e SERVER_ROOT=\"./web\" \\\n  -v $PWD:/app \\\n  -p 8443:8443 \\\n  -p 8443:8443/udp \\\n  --name yii2-frankenphp-worker \\\n  dunglas/frankenphp\n```\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- editorconfig-checker-enable --\u003e\n\n\u003e [!IMPORTANT]\n\u003e Your application will be available at `https://localhost:8443` or at the address set in the `Caddyfile`.\n\n### Development \u0026 Debugging\n\nFor enhanced debugging capabilities and proper time display in FrankenPHP, install the worker debug extension.\n\n```bash\ncomposer require --dev yii2-extensions/worker-debug:^0.1\n```\n\nAdd the following to your development configuration (`config/web.php`):\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nuse yii2\\extensions\\debug\\WorkerDebugModule;\n\nif (YII_ENV_DEV) {\n    // configuration adjustments for 'dev' environment\n    $config['bootstrap'][] = 'debug';\n    $config['modules']['debug'] = [\n        'class' =\u003e WorkerDebugModule::class,\n        // uncomment the following to add your IP if you are not connecting from localhost.\n        //'allowedIPs' =\u003e ['127.0.0.1', '::1'],\n    ];\n}\n```\n\n### File Upload Handling\n\nFor enhanced file upload support in worker environments, use the PSR-7 bridge UploadedFile class instead of the standard\nYii2 implementation.\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nuse yii2\\extensions\\psrbridge\\http\\{Response, UploadedFile};\n\nfinal class FileController extends \\yii\\web\\Controller\n{\n    public function actionUpload(): Response\n    {\n        $file = UploadedFile::getInstanceByName('avatar');\n\n        if ($file !== null \u0026\u0026 $file-\u003eerror === UPLOAD_ERR_OK) {\n            $file-\u003esaveAs('@webroot/uploads/' . $file-\u003ename);\n        }\n\n        return $this-\u003easJson(['status' =\u003e 'uploaded']);\n    }\n}\n```\n\n## Documentation\n\nFor detailed configuration options and advanced usage.\n\n- 📚 [Installation Guide](docs/installation.md)\n- ⚙️ [Configuration Reference](docs/configuration.md)\n- 🧪 [Testing Guide](docs/testing.md)\n- 🛠️ [Development Guide](docs/development.md)\n\n## Package information\n\n[![PHP](https://img.shields.io/badge/%3E%3D8.1-777BB4.svg?style=for-the-badge\u0026logo=php\u0026logoColor=white)](https://www.php.net/releases/8.1/en.php)\n[![Yii 2.0.x](https://img.shields.io/badge/2.0.53-0073AA.svg?style=for-the-badge\u0026logo=yii\u0026logoColor=white)](https://github.com/yiisoft/yii2/tree/2.0.53)\n[![Yii 22.0.x](https://img.shields.io/badge/22.0.x-0073AA.svg?style=for-the-badge\u0026logo=yii\u0026logoColor=white)](https://github.com/yiisoft/yii2/tree/22.0)\n[![Latest Stable Version](https://img.shields.io/packagist/v/yii2-extensions/franken-php.svg?style=for-the-badge\u0026logo=packagist\u0026logoColor=white\u0026label=Stable)](https://packagist.org/packages/yii2-extensions/franken-php)\n[![Total Downloads](https://img.shields.io/packagist/dt/yii2-extensions/franken-php.svg?style=for-the-badge\u0026logo=composer\u0026logoColor=white\u0026label=Downloads)](https://packagist.org/packages/yii2-extensions/franken-php)\n\n## Quality code\n\n[![Codecov](https://img.shields.io/codecov/c/github/yii2-extensions/franken-php.svg?style=for-the-badge\u0026logo=codecov\u0026logoColor=white\u0026label=Coverage)](https://codecov.io/github/yii2-extensions/franken-php)\n[![PHPStan Level Max](https://img.shields.io/badge/PHPStan-Level%20Max-4F5D95.svg?style=for-the-badge\u0026logo=php\u0026logoColor=white)](https://github.com/yii2-extensions/franken-php/actions/workflows/static.yml)\n[![Super-Linter](https://img.shields.io/github/actions/workflow/status/yii2-extensions/franken-php/linter.yml?style=for-the-badge\u0026label=Super-Linter\u0026logo=github)](https://github.com/yii2-extensions/franken-php/actions/workflows/linter.yml)\n[![StyleCI](https://img.shields.io/badge/StyleCI-Passed-44CC11.svg?style=for-the-badge\u0026logo=styleci\u0026logoColor=white)](https://github.styleci.io/repos/1031393416?branch=main)\n\n## Our social networks\n\n[![Follow on X](https://img.shields.io/badge/-Follow%20on%20X-1DA1F2.svg?style=for-the-badge\u0026logo=x\u0026logoColor=white\u0026labelColor=000000)](https://x.com/Terabytesoftw)\n\n## License\n\n[![License](https://img.shields.io/badge/License-BSD--3--Clause-brightgreen.svg?style=for-the-badge\u0026logo=opensourceinitiative\u0026logoColor=white\u0026labelColor=555555)](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyii2-extensions%2Ffranken-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyii2-extensions%2Ffranken-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyii2-extensions%2Ffranken-php/lists"}