PHPackages                             chubbyphp/chubbyphp-static-file - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. chubbyphp/chubbyphp-static-file

ActiveLibrary[HTTP &amp; Networking](/categories/http)

chubbyphp/chubbyphp-static-file
===============================

A minimal static file middleware for PSR 15.

1.4.1(3mo ago)2104↓100%21MITPHPPHP ^8.3CI passing

Since Apr 27Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/chubbyphp/chubbyphp-static-file)[ Packagist](https://packagist.org/packages/chubbyphp/chubbyphp-static-file)[ RSS](/packages/chubbyphp-chubbyphp-static-file/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (11)Versions (10)Used By (1)

chubbyphp-static-file
=====================

[](#chubbyphp-static-file)

[![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)[![Coverage Status](https://camo.githubusercontent.com/685c38b2e14bac94d8928f1d051a7eed1bc079731afea9755f01f6d49aec52a5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6368756262797068702f6368756262797068702d7374617469632d66696c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/chubbyphp/chubbyphp-static-file?branch=master)[![Mutation testing badge](https://camo.githubusercontent.com/2a9d71a67375a5e84d261bd076c308933f60b5b7d894d5d6fe83ced74a22edd0/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532466368756262797068702532466368756262797068702d7374617469632d66696c652532466d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyphp/chubbyphp-static-file/master)[![Latest Stable Version](https://camo.githubusercontent.com/d11b6f40608f096c8d70c732fa46130051c68388dafcaa5cb985db0769ef9ce1/68747470733a2f2f706f7365722e707567782e6f72672f6368756262797068702f6368756262797068702d7374617469632d66696c652f76)](https://packagist.org/packages/chubbyphp/chubbyphp-static-file)[![Total Downloads](https://camo.githubusercontent.com/dd208c76f5ba52d4d01b38b88c3f8ca9fe2a8418fe59d2c4e74b9251dc7107e6/68747470733a2f2f706f7365722e707567782e6f72672f6368756262797068702f6368756262797068702d7374617469632d66696c652f646f776e6c6f616473)](https://packagist.org/packages/chubbyphp/chubbyphp-static-file)[![Monthly Downloads](https://camo.githubusercontent.com/d76813d522295c88284b40916b84187ddb5eaff82dc53cd90abe6f62826063f4/68747470733a2f2f706f7365722e707567782e6f72672f6368756262797068702f6368756262797068702d7374617469632d66696c652f642f6d6f6e74686c79)](https://packagist.org/packages/chubbyphp/chubbyphp-static-file)

[![bugs](https://camo.githubusercontent.com/a8c5240aff120dc7236ce9d755be5c043392a81d2fe33454d42fc6b1a4d2cfd9/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d7374617469632d66696c65266d65747269633d62756773)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)[![code_smells](https://camo.githubusercontent.com/4c9cce86d459ddb1fe3428c6b26092fdf554ea67e29027684a548a429c5cf643/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d7374617469632d66696c65266d65747269633d636f64655f736d656c6c73)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)[![coverage](https://camo.githubusercontent.com/a6962e1a8d8471aa666c99b2aeeb2f954884889cd08c69aec1aca234411d225e/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d7374617469632d66696c65266d65747269633d636f766572616765)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)[![duplicated_lines_density](https://camo.githubusercontent.com/912724ff90b87586308c105d4fb627183ed1a8d5cad26929da1994b4ed8e8075/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d7374617469632d66696c65266d65747269633d6475706c6963617465645f6c696e65735f64656e73697479)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)[![ncloc](https://camo.githubusercontent.com/c44f059078ec9a753eec9cec680656560ec2e74776ac6e0ace485b57ecfbc2e3/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d7374617469632d66696c65266d65747269633d6e636c6f63)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)[![sqale_rating](https://camo.githubusercontent.com/924805663db8093b78b43c20eb5781ce22b7765fb8bb7a723f4ac84737204a90/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d7374617469632d66696c65266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)[![alert_status](https://camo.githubusercontent.com/a35882bca3e094da6f93f5c80523304a91077b1a873ed262f62bf6515f669e05/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d7374617469632d66696c65266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)[![reliability_rating](https://camo.githubusercontent.com/d5ca1ed3e6903ef1e83cdec62da38eb80ffa19863c4bf84e52c91a2e5f4a95ab/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d7374617469632d66696c65266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)[![security_rating](https://camo.githubusercontent.com/fbbff2740aae925306a35d5b23ae3134fec963e01e9dc46797b462e4e91f71b5/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d7374617469632d66696c65266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)[![sqale_index](https://camo.githubusercontent.com/d4b2312a2e277aa887347633935ef1b128dd7b98b587c6b0329126e38df62ab6/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d7374617469632d66696c65266d65747269633d7371616c655f696e646578)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)[![vulnerabilities](https://camo.githubusercontent.com/d8b2c2b276f849cc556b9447d064ee39ffab387c20206247f5b72633a1f92a7e/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d7374617469632d66696c65266d65747269633d76756c6e65726162696c6974696573)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-static-file)

Description
-----------

[](#description)

A minimal static file middleware for PSR 15.

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

[](#requirements)

- php: ^8.3
- [psr/http-factory](https://packagist.org/packages/psr/http-factory): ^1.1
- [psr/http-message](https://packagist.org/packages/psr/http-message): ^1.1|^2.0
- [psr/http-server-handler](https://packagist.org/packages/psr/http-server-handler): ^1.0.2
- [psr/http-server-middleware](https://packagist.org/packages/psr/http-server-middleware): ^1.0.2

Installation
------------

[](#installation)

Through [Composer](http://getcomposer.org) as [chubbyphp/chubbyphp-static-file](https://packagist.org/packages/chubbyphp/chubbyphp-static-file).

```
composer require chubbyphp/chubbyphp-static-file "^1.4"
```

Usage
-----

[](#usage)

```
