{"id":13616582,"url":"https://github.com/php-runtime/runtime","last_synced_at":"2026-02-24T12:31:17.122Z","repository":{"id":37292625,"uuid":"349397796","full_name":"php-runtime/runtime","owner":"php-runtime","description":"A home for runtimes. ","archived":false,"fork":false,"pushed_at":"2025-02-18T19:17:32.000Z","size":271,"stargazers_count":424,"open_issues_count":20,"forks_count":34,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-14T03:37:33.357Z","etag":null,"topics":["runtime"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-runtime.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["nyholm"]}},"created_at":"2021-03-19T11:21:26.000Z","updated_at":"2025-04-11T09:09:44.000Z","dependencies_parsed_at":"2024-05-20T07:48:04.039Z","dependency_job_id":"34445be8-aac3-49b5-845d-69010327b948","html_url":"https://github.com/php-runtime/runtime","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/php-runtime/runtime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-runtime%2Fruntime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-runtime%2Fruntime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-runtime%2Fruntime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-runtime%2Fruntime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-runtime","download_url":"https://codeload.github.com/php-runtime/runtime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-runtime%2Fruntime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29782068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["runtime"],"created_at":"2024-08-01T20:01:30.491Z","updated_at":"2026-02-24T12:31:17.092Z","avatar_url":"https://github.com/php-runtime.png","language":"PHP","readme":"# PHP Runtimes\n\n\u003cimg align=\"right\" src=\"https://raw.githubusercontent.com/php-runtime/runtime/main/.github/logo.png\"\u003e\n\nIn early 2021, Symfony created a \"Runtime component\". This component may look\ncomplex, weird, and full of hacks but it is a **game-changer** for how we run PHP\napplications.\n\nWith the Runtime component, we can look at each application as a \"black box\". A box\nthat has no connection to globals like `$_SERVER` or `$_GET`. To run the application\nyou need (you guessed it) a `Runtime`. It is a class that looks at the black box\nto figure out what input it requires and handles the output.\n\nConsider this small application that returns a UUID.\n\n```php\nnamespace Acme;\n\nclass Application\n{\n    public function run() {\n        return Uuid::uuid4()-\u003etoString();\n    }\n}\n```\n\nTo use this application with the Runtime component we need our front-controller\nto return a callable that will create the application.\n\n```php\n// index.php\n\nreturn function() {\n    return new Acme\\Application();\n}\n```\n\nIf you want to use this application in a CLI environment, you need a\n`Runtime` that knows how to run an `Acme\\Application` object and print the output on\nCLI. If you want to use it with Nginx/PHP-FPM then you need another `Runtime`\nthat converts the application's output to an HTTP response.\n\n## Why is this a good thing?\n\nSince your application is not connected to the global state, it is very portable.\nIt is easy to create a `Runtime` to run the application with Bref, Swoole or\nReactPHP without making any changes to the application itself.\n\nSince most modern PHP applications are based on Symfony's HttpKernel, PSR-7 or\nPSR-15 we don't need too many different runtimes. This organization holds many PHP\npackages with runtimes for the most popular environments. It is not \"*the source of\nall runtimes*\", but rather a temporary place where runtimes can live before they\nmove into Bref/Swoole/RoadRunner etc.\n\nAll runtimes have hard dependencies to make installation easier. Everything should\n\"just work\".\n\nRead more at the [Symfony documentation](https://symfony.com/doc/current/components/runtime.html).\n\n## Available Runtimes\n\n### Bref\n\nRun your application on AWS Lambda with [Bref](https://bref.sh/).\n\n* https://github.com/php-runtime/bref\n\n### Google Cloud\n\nRun your application on [Google Cloud](https://cloud.google.com/).\n\n* https://github.com/php-runtime/google-cloud\n\n### ReactPHP\n\nEvent-driven, non-blocking I/O with [ReactPHP](https://reactphp.org/).\n\n* https://github.com/php-runtime/reactphp\n\n### RoadRunner\n\nSpin up multiple PHP processes with Golang using [RoadRunner](https://roadrunner.dev/).\n\n* https://github.com/php-runtime/roadrunner-nyholm\n* https://github.com/php-runtime/roadrunner-symfony-nyholm\n\n### Swoole\n\nBuild high-performance, scalable, concurrent HTTP services with [Swoole](https://www.swoole.co.uk/).\n\n* https://github.com/php-runtime/swoole\n* https://github.com/php-runtime/swoole-nyholm\n\n### FrankenPHP\n\nRun your Symfony application with the [FrankenPHP](https://frankenphp.dev) app server.\n\n* https://github.com/php-runtime/frankenphp-symfony\n\n### PHP-FPM and traditional web servers\n\nThese runtimes are for PHP-FPM and the more traditional web servers one might\nuse for local development.\n\n#### Laravel\n\nA runtime for [Laravel](https://laravel.com/) and Artisan.\n\n* https://github.com/php-runtime/laravel\n\n#### PSR-7 and PSR-15\n\nUse the popular PSR architecture.\n\n* https://github.com/php-runtime/psr-guzzle\n* https://github.com/php-runtime/psr-laminas\n* https://github.com/php-runtime/psr-nyholm\n* https://github.com/php-runtime/psr-nyholm-laminas\n* https://github.com/php-runtime/psr-17 (generic)\n\n#### Symfony\n\nThe runtime for [Symfony](https://symfony.com/) is included in the runtime component.\n\n* https://github.com/symfony/runtime\n\n## Note about sessions\n\nOn Symfony \u003c 5.4 session data will not be properly stored when using a \"non-traditional\"\nwebserver like Bref, Google, ReactPHP, RoadRunner, or Swoole. This problem (or missing\nfeature) has been added in Symfony 5.4 and 6.0. You need to use `symfony/http-kernel \u003e= 5.4` \nfor sessions to work properly.\n\n## Contribute\n\nContributions are always welcomed. Send your PR or open an issue here: https://github.com/php-runtime/runtime\n","funding_links":["https://github.com/sponsors/nyholm"],"categories":["PHP","Framework Integration"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-runtime%2Fruntime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-runtime%2Fruntime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-runtime%2Fruntime/lists"}