{"id":18834335,"url":"https://github.com/chubbyphp/chubbyphp-static-file","last_synced_at":"2025-04-14T04:32:23.559Z","repository":{"id":47556055,"uuid":"215854316","full_name":"chubbyphp/chubbyphp-static-file","owner":"chubbyphp","description":"A minimal static file middleware for PSR 15.","archived":false,"fork":false,"pushed_at":"2025-03-12T14:09:15.000Z","size":77,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T18:55:28.898Z","etag":null,"topics":["chubbyphp","middleware","psr-15","static-file"],"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/chubbyphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2019-10-17T17:58:40.000Z","updated_at":"2025-03-12T14:09:20.000Z","dependencies_parsed_at":"2025-01-21T06:22:27.526Z","dependency_job_id":"fcbc5993-1d4b-469d-8314-0a060edf7449","html_url":"https://github.com/chubbyphp/chubbyphp-static-file","commit_stats":{"total_commits":45,"total_committers":4,"mean_commits":11.25,"dds":"0.33333333333333337","last_synced_commit":"55cbb6d477eda81879e35cb320acf882e488ed1e"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-static-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-static-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-static-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-static-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chubbyphp","download_url":"https://codeload.github.com/chubbyphp/chubbyphp-static-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248822007,"owners_count":21166990,"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":["chubbyphp","middleware","psr-15","static-file"],"created_at":"2024-11-08T02:11:59.932Z","updated_at":"2025-04-14T04:32:23.553Z","avatar_url":"https://github.com/chubbyphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chubbyphp-static-file\n\n[![CI](https://github.com/chubbyphp/chubbyphp-static-file/actions/workflows/ci.yml/badge.svg)](https://github.com/chubbyphp/chubbyphp-static-file/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/chubbyphp/chubbyphp-static-file/badge.svg?branch=master)](https://coveralls.io/github/chubbyphp/chubbyphp-static-file?branch=master)\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fchubbyphp%2Fchubbyphp-static-file%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyphp/chubbyphp-static-file/master)\n[![Latest Stable Version](https://poser.pugx.org/chubbyphp/chubbyphp-static-file/v)](https://packagist.org/packages/chubbyphp/chubbyphp-static-file)\n[![Total Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-static-file/downloads)](https://packagist.org/packages/chubbyphp/chubbyphp-static-file)\n[![Monthly Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-static-file/d/monthly)](https://packagist.org/packages/chubbyphp/chubbyphp-static-file)\n\n[![bugs](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-static-file\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)\n[![code_smells](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-static-file\u0026metric=code_smells)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)\n[![coverage](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-static-file\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)\n[![duplicated_lines_density](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-static-file\u0026metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)\n[![ncloc](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-static-file\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)\n[![sqale_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-static-file\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)\n[![alert_status](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-static-file\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)\n[![reliability_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-static-file\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)\n[![security_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-static-file\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)\n[![sqale_index](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-static-file\u0026metric=sqale_index)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)\n[![vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-static-file\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)\n\n\n## Description\n\nA minimal static file middleware for PSR 15.\n\n## Requirements\n\n * php: ^8.2\n * [psr/http-factory][2]: ^1.0.2\n * [psr/http-message][3]: ^1.1|^2.0\n * [psr/http-server-handler][4]: ^1.0.2\n * [psr/http-server-middleware][5]: ^1.0.2\n\n## Installation\n\nThrough [Composer](http://getcomposer.org) as [chubbyphp/chubbyphp-static-file][1].\n\n```sh\ncomposer require chubbyphp/chubbyphp-static-file \"^1.4\"\n```\n\n## Usage\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App;\n\nuse Chubbyphp\\StaticFile\\StaticFileMiddleware;\nuse Psr\\Http\\Message\\ResponseFactoryInterface;\nuse Psr\\Http\\Message\\StreamFactoryInterface;\n\n/** @var ResponseFactoryInterface $responseFactory */\n$responseFactory = ...;\n\n/** @var StreamFactoryInterface $streamFactory */\n$streamFactory = ...;\n\n$app = ...;\n\n// add the static file middleware before the routing your PSR15 based framework\n$app-\u003eadd(new StaticFileMiddleware(\n    $responseFactory,\n    $streamFactory,\n    __DIR__ . '/public'\n));\n\n```\n\n## Copyright\n\n2025 Dominik Zogg\n\n[1]: https://packagist.org/packages/chubbyphp/chubbyphp-static-file\n\n[2]: https://packagist.org/packages/psr/http-factory\n[3]: https://packagist.org/packages/psr/http-message\n[4]: https://packagist.org/packages/psr/http-server-handler\n[5]: https://packagist.org/packages/psr/http-server-middleware\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchubbyphp%2Fchubbyphp-static-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchubbyphp%2Fchubbyphp-static-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchubbyphp%2Fchubbyphp-static-file/lists"}