{"id":14966439,"url":"https://github.com/yiisoft/yii-http","last_synced_at":"2025-10-19T09:31:18.641Z","repository":{"id":37098675,"uuid":"426765573","full_name":"yiisoft/yii-http","owner":"yiisoft","description":"Yii HTTP Application","archived":false,"fork":false,"pushed_at":"2024-04-04T08:52:52.000Z","size":73,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-04-13T23:52:53.747Z","etag":null,"topics":["hacktoberfest","http","yii3"],"latest_commit_sha":null,"homepage":"https://www.yiiframework.com/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yiisoft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"open_collective":"yiisoft","github":["yiisoft"]}},"created_at":"2021-11-10T20:23:01.000Z","updated_at":"2024-01-02T22:18:37.000Z","dependencies_parsed_at":"2023-02-09T15:35:11.124Z","dependency_job_id":"65340eb8-dbb8-484a-bb71-3a80829c3e36","html_url":"https://github.com/yiisoft/yii-http","commit_stats":{"total_commits":45,"total_committers":10,"mean_commits":4.5,"dds":0.7555555555555555,"last_synced_commit":"adc6ec88c70b82949a829f5f5d7833653d211b69"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":"yiisoft/package-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Fyii-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Fyii-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Fyii-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiisoft%2Fyii-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yiisoft","download_url":"https://codeload.github.com/yiisoft/yii-http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219869926,"owners_count":16555204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["hacktoberfest","http","yii3"],"created_at":"2024-09-24T13:36:23.345Z","updated_at":"2025-10-19T09:31:18.636Z","avatar_url":"https://github.com/yiisoft.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/yiisoft\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://yiisoft.github.io/docs/images/yii_logo.svg\" height=\"100px\" alt=\"Yii\"\u003e\n    \u003c/a\u003e\n    \u003ch1 align=\"center\"\u003eYii HTTP Application\u003c/h1\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\n[![Latest Stable Version](https://poser.pugx.org/yiisoft/yii-http/v)](https://packagist.org/packages/yiisoft/yii-http)\n[![Total Downloads](https://poser.pugx.org/yiisoft/yii-http/downloads)](https://packagist.org/packages/yiisoft/yii-http)\n[![Build status](https://github.com/yiisoft/yii-http/actions/workflows/build.yml/badge.svg)](https://github.com/yiisoft/yii-http/actions/workflows/build.yml)\n[![Code Coverage](https://codecov.io/gh/yiisoft/yii-http/branch/master/graph/badge.svg)](https://codecov.io/gh/yiisoft/yii-http)\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyiisoft%2Fyii-http%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/yiisoft/yii-http/master)\n[![static analysis](https://github.com/yiisoft/yii-http/workflows/static%20analysis/badge.svg)](https://github.com/yiisoft/yii-http/actions?query=workflow%3A%22static+analysis%22)\n[![type-coverage](https://shepherd.dev/github/yiisoft/yii-http/coverage.svg)](https://shepherd.dev/github/yiisoft/yii-http)\n\nThis Yii framework package provides the application class, as well as the events\nand handlers needed to interact with HTTP. The package is implemented using\n[PSR-7](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message.md) interfaces.\n\n## Requirements\n\n- PHP 8.1 or higher.\n\n## Installation\n\nThe package could be installed with [Composer](https://getcomposer.org):\n\n```shell\ncomposer require yiisoft/yii-http\n```\n\n## General usage\n\nIn case you use one of the Yii 3 standard application templates, then the application is already configured\nthere and is running using [yiisoft/yii-runner-http](https://github.com/yiisoft/yii-runner-http) package.\n\nIf not, then use one of the HTTP runners that is suitable for your environment:\n\n- [HTTP](https://github.com/yiisoft/yii-runner-http)\n- [RoadRunner](https://github.com/yiisoft/yii-runner-roadrunner)\n\nand create an entry script as described in readme of the packages.\n\nIf you do not use Yii HTTP runners, then the code for launching the application in your entry script may look like this:\n\n```php\nuse Yiisoft\\Yii\\Http\\Application;\nuse Yiisoft\\Yii\\Http\\Handler\\NotFoundHandler;\nuse Yiisoft\\Yii\\Http\\Handler\\ThrowableHandler;\n\n/**\n * @var Psr\\EventDispatcher\\EventDispatcherInterface $eventDispatcher\n * @var Psr\\Http\\Message\\ResponseFactoryInterface $responseFactory\n * @var Psr\\Http\\Message\\ServerRequestInterface $request\n * @var Yiisoft\\ErrorHandler\\Middleware\\ErrorCatcher $errorCatcher\n * @var Yiisoft\\Middleware\\Dispatcher\\MiddlewareDispatcher $dispatcher\n */\n\n$fallbackHandler = new NotFoundHandler($responseFactory);\n$application = new Application($dispatcher, $eventDispatcher, $fallbackHandler);\n\ntry {\n    $application-\u003estart();\n    $response = $application-\u003ehandle($request);\n    // Emit a response.\n} catch (Throwable $throwable) {\n    $handler = new ThrowableHandler($throwable);\n    $response = $errorCatcher-\u003eprocess($request, $handler);\n    // Emit a response with information about the error.\n} finally {\n    $application-\u003eafterEmit($response ?? null);\n    $application-\u003eshutdown();\n}\n```\n\n## Documentation\n\n- [Internals](docs/internals.md)\n\nIf you need help or have a question, the [Yii Forum](https://forum.yiiframework.com/c/yii-3-0/63) is a good place for that.\nYou may also check out other [Yii Community Resources](https://www.yiiframework.com/community).\n\n## License\n\nThe Yii HTTP Application is free software. It is released under the terms of the BSD License.\nPlease see [`LICENSE`](./LICENSE.md) for more information.\n\nMaintained by [Yii Software](https://www.yiiframework.com/).\n\n## Support the project\n\n[![Open Collective](https://img.shields.io/badge/Open%20Collective-sponsor-7eadf1?logo=open%20collective\u0026logoColor=7eadf1\u0026labelColor=555555)](https://opencollective.com/yiisoft)\n\n## Follow updates\n\n[![Official website](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat)](https://www.yiiframework.com/)\n[![Twitter](https://img.shields.io/badge/twitter-follow-1DA1F2?logo=twitter\u0026logoColor=1DA1F2\u0026labelColor=555555?style=flat)](https://twitter.com/yiiframework)\n[![Telegram](https://img.shields.io/badge/telegram-join-1DA1F2?style=flat\u0026logo=telegram)](https://t.me/yii3en)\n[![Facebook](https://img.shields.io/badge/facebook-join-1DA1F2?style=flat\u0026logo=facebook\u0026logoColor=ffffff)](https://www.facebook.com/groups/yiitalk)\n[![Slack](https://img.shields.io/badge/slack-join-1DA1F2?style=flat\u0026logo=slack)](https://yiiframework.com/go/slack)\n","funding_links":["https://opencollective.com/yiisoft","https://github.com/sponsors/yiisoft"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyiisoft%2Fyii-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyiisoft%2Fyii-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyiisoft%2Fyii-http/lists"}